1
ブラウザで表示しようとすると角表示が表示されない理由を簡単に把握できません。あなたが不足しているAngularJSの式が処理されていません
<!doctype html>
<html>
<head>
<script src="Scripts\angular.js"></script>
<script src="Scripts\script.js"></script>
</head>
<body ng-app="myModule" style="font-family:Arial">
<div ng-controller="myController">
<ul>
<li ng-repeat="country in countries">
{{country.name}}
<ul>
<li ng-repeat="city in country.cities">
{{city.name}}
</li>
</ul>
</li>
</ul>
</div>
</body>
</html>
var myApp = angular
.module("myModule", [])
.controller("myController", function($scope) {
var countries = [
{
name: "UK",
cities: [
{ name: "London" },
{ name: "Manchester" },
{ name: "Portsmouth" }
]
},
{
name: "USA",
cities: [
{ name: "New York" },
{ name: "Trenton" },
{ name: "Philidelphia" }
]
},
{
name: "Poland"
cities: [
{ name: "Warsaw" },
{ name: "Poznan" },
{ name: "Lodz" }
]
}
];
$scope.countries = countries;
});
[ブラウザのコンソールを開きます](http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers)とが存在するかどうかを確認エラーメッセージ。 – JJJ