Angular Controller spricht nicht zur Ansicht. ng-app ist enthalten und ist auch ng-controller.Winkelregler, der keine Variablen zum Anzeigen druckt
Verwendung von mainJS. Hier
ist die Ansicht:
<section ng-app="my-module" ng-controller="MyModuleController">
<div>
{{ costumers[0] }}
</div>
</section>
Hier ist die Steuerung:
(function() {
'use strict';
angular
.module('my-module')
.controller('MyModuleController', MyModuleController);
MyModuleController.$inject = ['$scope'];
function MyModuleController($scope) {
var vm = this;
// My module controller logic
// ...
$scope.costumers = [{
name: 'John Doe',
city: 'New York'
}, {
name: 'Peter Griffin',
city: 'San Francisco'
}];
init();
function init() {
}
}
})();
alles in Browser-Konsole? –
Können Sie das richtige HTML sehen? –
@ Mr.Arjun angular.js: 11706 Fehler: [ng: Areq] Argument 'MymoduleController' ist keine Funktion, undefined – GreetingsFriend