2014-03-30 3 views
0

이 간단한 각도 컨트롤러가 작동하지 않습니다. 나는 코드에 어떤 문제도 찾아 낼 수 없다. 너는 할수 있니 ? 이 .................................AngularJS 함수가 호출되지 않음

<!DOCTYPE html> 
<html> 
<head> 
<title>AngularJS Controller</title> 
</head> 
<body> 
    <div ng-controller="SimpleController"> 
     Name: 
     <br/> 
     <input type="text" ng-model="nameText"/> 
     <br/> 
     <ul> 
     <li ng-repeat="cust in customers | filter:nameText | orderBy : 'name' ">{{ cust.name }} - {{ cust.city }} 
     </li> 
     </ul> 
    </div> 


<script src="Scripts/angular.min.js"></script> 

<script> 
    function SimpleController ($scope){ 
     $scope.customers = [ 
      { name:'Konstantinos Korovesis', city:'Pikermi' }, 
      { name:'Akis Manolis', city:'Argos' }, 
      { name:'Irem Var', city:'Nea Smirni' }, 
      { name:'Antonis Ralis', city:'Pallini' } 
     ]; 
    } 
</script> 

</body> 
</html> 

내가 내 브라우저에서 볼 것입니다 .. .................

이름 :

[................]

{ {cust.name}} - {{cust.city}}

답변

1

ng-app을 추가하십시오. Angular는 각도에 대한 문서의 루트를 지정해야합니다.

<html ng-app> 
+0

Ops.Thanks #Shamed – user3418042

관련 문제