What are Directives in Angular Js? Explain important directives.
Question :
What are Directives in Angular Js? Explain important directives.
AngularJS directives are used to extend HTML. Directives are markers on HTML DOM element that tell AngularJS to attach a specified behavior to that HTML element.
Directives in AngularJS are special attributes starting with ng- prefix where ng stands for Angular. AngularJS includes various built-in directives, you may also create your own directive in AngularJS. Some built-in directives are listed here.
ng-app
The ng-app directive defines the root element of an AngularJS application and starts an AngularJS Application.The ng-app directive will auto-bootstrap (automatically initialize) the application when a web page is loaded. It is also used to load various AngularJS modules in AngularJS Application.
ng-init
ng-init directive initializes an AngularJS Application data. It is used to declare and assign values to the variables for an AngularJS application.
ng-repeat
The ng-repeat directive repeats HTML elements for each item in a collection. Or simply say that it is used to loop through items in collection element and it will act as for loop.
ng-model
The ng-model directive is used for two-way data binding in AngularJS. It is used to get value of input controls like textbox, label, etc and use these values in web pages.
ng-bind
The ng-bind directive binds the model property declared via ng-model directive or the result of
an expression to the HTML element. It also updates an element if the value of an expression
changes.
Similar Questions
What is ng-App directive in Angular JS?
What is a controller in Angular JS?
Explain the ng-model directive in Angular JS.
What are the Angular Modules?
Distinguish between Angular JS and JavaScript expressions.
What do you understand by Angular JS?
What are the advantages of using Angular JS?
Explain what are directives? Mention some of the most commonly used directives in AngularJS application?
What are events in JavaScript and its Types?
What is an operator and what are its types?
How can you create an Array in JavaScript?
What are the features of JavaScript?
Explain what is pop() method in JavaScript?
What is JavaScript?
What are AngularJS modules?
What are events? Where they are used.
What is form validation in JavaScript? How client side validation is different from server level validation.
What are Directives in Angular Js? Explain important directives.
What is Angular JS expressions? Explain with example
What is an operator and what are its types in JavaScript?