mardi 27 janvier 2015

AngularJs not working in a simple project


I created a simple helloworld with angular But I cant see result from it! My angular.min.js is in the html file and it loads correctly in browser. my code:



<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>

<body>
<h1 ng-controller="HelloWorldCtrl">{{helloMessage}}</h1>

<script src="angular.min.js"></script>
<script type="text/javascript">
function HelloWorldCtrl($scope){
$scope.helloMessage = "Hello Mohammad";
}
</script>
</body>
</html>


Result : {{helloMessage}}





Aucun commentaire:

Enregistrer un commentaire