Сообщение от nerv_
|
phonecatApp.controller("PhonelistCtrl", function ($scope) {}
|
И не только это...
Похоже у
dozer вообще проблема с синтаксисом JS.
Вот рабочий вариант
<!DOCTYPE html>
<html ng-app='phonecatApp'>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=windows-1251' />
<script src="https://code.angularjs.org/1.3.9/angular.min.js"></script>
<!--
<script src='http://code.jquery.com/jquery-latest.js'></script>
<script src="https://code.angularjs.org/1.3.9/angular-route.js"></script>
<link rel='stylesheet type=text/css href=tmp.css' />
<link rel="stylesheet/less" type="text/css" href="style.less">
<script src="http://cdnjs.cloudflare.com/ajax/libs/less.js/2.5.0/less.min.js"></script>
-->
<style type='text/css'>
</style>
<script type='text/javascript'>
var phonecatApp = angular.module("phonecatApp", []);
phonecatApp.controller("PhonelistCtrl", function ($scope) {
$scope.phones=[{
'name' : 'samsung',
'snippet' : 'This phone look graet'},
{'name' : 'Motorola',
'snippet' : 'This is great telephone' },
{'name' : 'Motorola XOOM',
'snippet' : 'Very cool device'}
];
});
</script>
</head>
<body>
<body ng-controller="PhonelistCtrl">
<ul>
<li>
<span>{{phones[0].name}}</span>
<p>
{{phones[0].snippet}}
</p>
</li>
<li>
<span>{{phones[1].name}}</span>
<p>
{{phones[1].snippet}}
</p>
</li>
</ul>
</body>
</html>
Ищи различия...