以下代码在Angular 1.2中正常工作,但它不适用于1.3
我应该更改什么才能使其在1.3上运行?
<!DOCTYPE html>
<html data-ng-app="">
<head>
<title>MyApp</title>
</head>
<body>
<div class="wrapper" ng-controller="SimpleController">
<div>Name:</div>
<div>
<input type="text" ng-model="filterword">
</div>
<ul>
<li ng-repeat="person in contacts | filter: filterword | orderBy: 'name'" >{{ person.name }} lives in {{ person.city }}</li>
</ul>
</div>
<script>
var SimpleController = function($scope){
$scope.contacts = [
{name: 'Dave',
city: 'Dresden'},
{name:'John',
city: 'Madrid'},
{name:'Jane',
city: 'Berlin'}
];
}
</script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script>
</body>
</html>