8. ANGULARJS
Directives
Directives are markers on a DOM element
that tells AngularJS’s HTML Compiler to attach a
specified behavior to that DOM element
or even transform that DOM element and
its children.
9. ANGULARJS
Directives
• ng-app - designates the root element of the application
• ng-model - binds a control to a property on the scope
• ng-click - specify custom behavior when an element is clicked
• ng-repeat - instantiates a template once per item for a collection
• ng-init - evaluate an expression in the current scope
• ng-controller- attaches controller class to the view
More…
10. DEMONSTRATIONS
• Demo 1: ng-app and ng-model
• Demo 2: ng-init and ng-repeat with ordering and filtering
• Demo 3: Using controllers
$scope
• Demo 4: ng-click
Modules
Two-way binding
11. OTHER FEATURES
• Config
• Routes
• Factory
• Provider
• Service
• Value
factory - you actually create an object inside of the factory and return it.
service - you just have a standard function that uses the this keyword to define function.
provider - there’s a $get you define and it can be used to get the object that returns the data.
value - is just a way to get for instance a config value