This doesn't work:
<div ng-app ng-controller="MyCtrl">
<input type="text" ng-model="sometext" />
<p>{{sometext}}</p>
<ul ng-repeat="item in somelist">
<li>{{item}}</li>
</ul>
</div>
<script src="scripts/angular.js"></script>
<script src="scripts/app/app.js"></script>
and if I reference angular from CDN it is ok?
I started with Empty Web project in VisualStudio and added angular using nuget
This is error from angular
Error: [ng:areq] Argument 'MyCtrl' is not a function, got undefined
http://errors.angularjs.org/1.3.0/ng/areq?p0=MyCtrl&p1=not%20a%20function%2C%20got%20undefined
at http://localhost:60732/scripts/angular.js:80:12
Edit1 Controller code:
var MyCtrl = function($scope) {
$scope.somelist = ['1', '2', '3'];
return true;
};
This Works
<div ng-app ng-controller="MyCtrl">
<input type="text" ng-model="sometext" />
<p>{{sometext}}</p>
<ul ng-repeat="item in somelist">
<li>{{item}}</li>
</ul>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
<script src="scripts/app/app.js"></script>