Wednesday, 5 July 2017

angularjs

1. ng-app
  • define the root element of the angularjs application in html

2.  angular.module
  • define the angularjs application in javascript

3. $scope
  • the model in MVC pattern (html being the view, controller being the control) 

4. data binding
  • ng-model="firstname"
  • {{firstname}}
  •  ng-model="firstname" (two way binding)

5. filter
  • a normal filter '|' transform data
  • a 'filter' filter select a subset of array

6. service
  • a singleton object that provide utility
  • example: $scope, $filter


reference

No comments:

Post a Comment