【发布时间】:2017-02-24 05:26:59
【问题描述】:
我正在尝试创建一个具有 ngSanitize 的 Angular 控制器,就像这里的示例 https://docs.angularjs.org/api/ngSanitize/service/$sanitize
但我不确定如何在 CoffeeScript 中执行此操作。
在文档中的示例中,这是使用 ngSanitize 创建控制器的方式。
angular.module('sanitizeExample', ['ngSanitize'])
.controller('ExampleController', ['$scope', '$sce', function($scope, $sce)
这是我当前用 CoffeeScript 编写的控制器:
app = angular.module 'example'
app.controller 'exampleController', ($scope, widgetSrv)
如何将 ngSanitize 添加到此?
【问题讨论】: