1
angular Controller kann nicht mit index.html das Projekt wird mit http-Server mit node.js installiert ausgeführt werden.kann nicht ausgeführt werden angularjs file controller Fehler
classifieds.js
`(function() {
"use strict";
angular
.module("ngClassifieds")
.controller("ClassifiedsCtrl", ['$scope', function($scope) {
$scope.name ={text: 'Asif'};
};
}]();`
index.html
`<!DOCTYPE html>
<html>
<head>
<title>ngClassifieds</title>
</head>
<body ng-app="ngClassfieds" ng-controller="ClassifiedsCtrl">
<input type="text" placeholder="Whats your name" ng-model="name" >
<h1>{{greeting.text}}</h1>
<script src="node_modules/angular/angular.min.js"> </script>
<script src="scripts/app.js"></script>
<script src="components/classifieds.js"></script>
</body>
</html>`
aussehen lassen sollte eine Verwendung 'ngClassifieds' -Modul, eckig. Modul ("ngClassifieds", []) .. – Ajay