Trying to follow a tutorial, I can't get the "Hello, world" example working. Instead it displays: "{{greeting.text}}, world". Using Chrome and AngularJS 1.3.1.
index.html:
<!DOCTYPE html> <html ng-app> <head> <script src="angular.js"></script> <script src="app.js"></script> <!--<link rel="stylesheet" type="text/css" href="bootstrap.min.css" />--> </head> <body> <div ng-controller='HelloController'> <p>{{greeting.text}}, world </p> </div> </body> </html>
app.js
function HelloController($scope) { $scope.greeting = { text: 'Hello' }; }
My folder structure
root/ angular.js app.js index.html
Thank you
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With