Angular Directives | angularjs w3c
AngularJSletsyouextendHTMLwithnewattributescalledDirectives.AngularJShasasetofbuilt-indirectiveswhichoffersfunctionalitytoyourapplications.AngularJSalsoletsyoudefineyourowndirectives.AngularJSDirectivesAngularJSdirectivesareextendedHTMLattributeswiththeprefixng-.Theng-appdirectiveinitializesanAngularJSapplication.Theng-initdirectiveinitializesapplicationdata.Theng-modeldirectivebindsthevalueofHTMLcontrols(input,select,textarea)toapplicationdata.ReadaboutallAngularJSdirectivesinourAngularJSdi...
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.
AngularJS DirectivesAngularJS 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.
Read about all AngularJS directives in our AngularJS directive reference[1].
Example<p>Name: <input type="text" ng-model="firstName"></p><p>You wrote: {{ firstName }}</p>
</div>
Try it Yourself »[2]The ng-app directive also tells AngularJS that the <div> element is the "owner" of the AngularJS applicat...