Last active
December 27, 2015 04:39
-
-
Save wastemobile/7268456 to your computer and use it in GitHub Desktop.
據說 AngularJS 頁面若是被 IE8 以下的瀏覽器摸到,因為對 JSON 支援不足的緣故,會整個 View Template 直接秀出來,必須改用下面的寫法。IE 果真是網路的殺手啊~
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html ng-app id="ng-app" class="ng-app"> | |
<head runat="server"> | |
<title></title> | |
<!--[if lte IE 8]> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/json3/3.2.5/json3.min.js"></script> | |
<![endif]--> | |
<script src="Scripts/angular.min.js" type="text/javascript"></script> | |
<style type="text/css"> | |
table,table td{border:1px solid gray} | |
</style> | |
</head> | |
<body > | |
<form id="form1" runat="server"> | |
<div ng-init="friends = [{ name: 'John', age: 25 }, { name: 'Mary', age: 28}]">有{{friends.length}}筆資料</div> | |
<br /> | |
<table > | |
<tr ng-repeat="friend in friends"> | |
<td>{{friend.name}}</td><td>{{friend.age}}</td> | |
</tr> | |
</table> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment