04-Directives.pdf - AngularJS lets you extend HTML with new...

This preview shows page 1 - 7 out of 14 pages.

Image of page 1
AngularJS lets you extend HTML with new attributes called Directives . AngularJS has a set of built-in directives which offers functionality to your applications. AngularJS also lets you define your own directives.
Image of page 2
AngularJS directives are extended HTML attributes with the prefix ng- . The ng-app directive initializes an AngularJS application. The ng-init directive initializes application data. The ng-model directive binds the value of HTML controls (input, select, textarea) to application data.
Image of page 3
Image of page 4
The ng-app directive defines the root element of an AngularJS application. The ng-app directive will auto-bootstrap (automatically initialize) the application when a web page is loaded. <div ng-app =“”> . . . </div>
Image of page 5