我有以下代码
@H_502_1@var app =
angular.
module("myApp",[]).
config(function($routeProvider,$locationProvider) {
$routeProvider.when('/someplace',{
templateUrl: 'sometemplate.html',controller: SomeControl
});
// configure html5 to get links working on jsfiddle
$locationProvider.html5Mode(true);
});
app.controller('SomeControl',...);
我收到以下错误
@H_502_1@Uncaught ReferenceError: SomeControl is not defined from myApp问题只是我无法使用app.controller(‘SomeControl’,…)语法?当使用$ routeProvider?是唯一的工作语法:
@H_502_1@function SomeControl(...)
使用引号:
@H_502_1@controller: 'SomeControl'