<!DOCTYPE html>
<html>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
<body>
<div ng-app="canerApp" ng-controller="canerCtrl">
<br> {{text}}f
</div>
<script type="text/javascript">
var app = angular.module('canerApp', []);
app.controller('canerCtrl', function($scope){
$scope.text ="ff";
});
</script>
</body>
</html>
this works and prints
fff
as you can see here
http://plnkr.co/edit/gP2NcC38JPsabQFacGkb?p=preview
but this doesnot work
<!DOCTYPE html>
<html>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
<body>
<div ng-app="myApp" ng-controller="myController">
<br> {{text}}f
<br> {{text}}fh
</div>
<script type="text/javascript">
var app= angular.module('myApp',[]);
app.controller('myController', function($scope){
$scope.text="afasfa";
});
</script>
</body>
</html>
can be seen here https://plnkr.co/edit/1I90i5ANdrA6OUmZry65?p=preview
they totally same except controller and app nmes.
i spent one hour but couldnot figure out. ANd also couldnot find online error finders to validate if everything is true.
httpsin your second code<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>httpsin it, if it havehttpsthen you have to use all the cdn usinghttpsprotocol