我試圖創建一個angularjs應用程序將用於ie8。角度不工作ie8儘管建議
根據此頁面:https://docs.angularjs.org/guide/ie它應該使用角度1.2,我使用。
我的index.html是:
<!doctyme html>
<html ng-app="app" id="ng-app" >
<head>
<script src="./angular.js">
</script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular-resource.min.js">
</script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular-route.min.js"></script>
<script src="./custom.js">
</script>
</head>
<body>
<div ng-controller="statsController">
<label>Nom:</label>
<input type="text" ng-model="yourName" placeholder="Enter your name">
<hr>
<h1>Hello {{yourName}}</h1>
<div>
<label>Seance:</label>
<input type="text" ng-model="yourSession" placeholder="Entersession name">
<hr>
<h1>Vous voulez des stats pour {{ yourSession }}</h1>
</div>
<table>
<tr ng-repeat="seance in seances | filter:yourSession">
<td> {{seance.title}} </td>
<td> {{seance.stats }}</td>
</tr>
</table>
</div>
</body>
</html>
和我的js代碼是
var app = angular.module('app', []);
app.controller('statsController', function($scope){
$scope.seances = [
{"id":1 , "title":"seance1 ,multi-acces", "stats":150},
{"id":2 , "title":"seance 2 ,etre administrateur", "stats":550},
{"id":3 , "title":"seance3, comment gérer sa vie", "stats":10},
{"id":4 , "title":"derniere seance , comment réussir son breakfast", "stats":15150}
];
$scope.yourName = "lzlz";
});
的問題是,我的瀏覽器不interprate的{{YOURNAME}}並顯示爲是。
有人知道它爲什麼不起作用嗎?
感謝
但一切其他的作品?開發工具控制檯中的任何錯誤? – ivarni 2014-08-27 08:49:24
你已經在html中獲得了angular.js和custom.js。你有這些文件的來源嗎?如果你的angular.js文件包含上面提到的js,你需要將它包含在角度源cdn文件 – 2014-08-27 08:54:14
的下面,你在doctype(doctyme)中也有一個錯字, – 2014-08-27 08:54:42