我有一個簡單的角碼不會運行,由於這個錯誤; IVE添加角路由器文件的服務器中發現它,但它不斷給我這個錯誤
Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.6.5/$injector/modulerr?p0=task&p1=Error%3A%20…0Uc%20(http%3A%2F%2Flocalhost%3A3000%2Fangular%2Fangular.min.js%3A22%3A332)
at angular.min.js:7
at angular.min.js:43
at p (angular.min.js:8)
at g (angular.min.js:42)
at gb (angular.min.js:46)
at c (angular.min.js:22)
at Uc (angular.min.js:22)
at xe (angular.min.js:21)
at angular.min.js:333
at HTMLDocument.b (angular.min.js:38)
我看來代碼
<html >
<head>
<title>
</title>
</head>
<body ng-app="task" ng-init="first = 1;">
<h1>Task List</h1>
<div ng-controller="ctrl">
<span>Values: {{first}}</span>
<input type="text" ng-model="first" />
</div>
<script src="angular/angular.min.js"></script>
<script src="bower_components/angular-route/angular-route.js"></script>
<script src="angular/app.js"></script>
</body>
</html>
我app.js代碼
var task = angular.module('myApp', ['ngRoute']);
task.controller('ctrl', function($scope){
$scope.first = 1;
});
請幫忙。
都能跟得上只是爲了測試我的代碼工作 – Mustapha
仍不起作用... – Mustapha