[caption id="" align="aligncenter" width="523"]
Hottest topic nowadays, Angular.js[/caption]
Angular.js (i.e. "Angular") is one of the most hottest topics in programming nowadays (which is justified.. the
MV* framework is taking off quiete rapidly..), Google's work on Angular's framework is awesome.
and I really recommend to take some time to observe some of the new features that can come handy..
ng-'Hello World' Simple App
Today I will review the simple (and mandatory!)
'Hello World' first app, so you can take it from there..
First of all, all you need to do, is go to
angular.js.org website and download Angular script from there, you can also download it directly from
here from
github after setting up your project, take a look at this code in front of you:
- Angular link: it is a good practice to place it in the bottom of the page, since you want it to run after all of your code is already rendered..
- ng-app: in the <html> tag, place the ng-app attribute to tell the page to use Angular.js as its framework.
- ng-controller: since Angular.js is MVC (and frankly, as I learn it more deeply, I think thats the core and the strength of angular ...), we should define what element in the DOM is our controller, and then pass the function in the script (which I will explain in the next bulletin ).
- <script>: in this script, there is one function who is triggered once the HelloCtrl ng-controller is run.
- $scope: this is our model .
- {{}} : the curly brackets, is where you should place your properties within your functions