Mam następujący kod;AngularJS Uncaught ReferenceError: kontroler nie jest zdefiniowany z modułu
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', ...);
otrzymuję następujący błąd
Uncaught ReferenceError: SomeControl is not defined from myApp
Czy problem tylko, że nie mogę używać app.controller ('SomeControl', ...) składni? podczas korzystania z $ routeProvider? Składnia jest tylko praca:
function SomeControl(...)
duplikat: http://stackoverflow.com/questions/11211999/using-angular-controllers-created-with-angular-module-controller –
Thanks @KarlZilles - Szukałem, ale brakowało ten. –