How to create custom directives in AngularJS?



How to create custom directives in AngularJS?..

Answer / pankajbisane

Custom directives are used in AngularJS to extend the functionality of HTML. Custom directives are defined using "directive" function. A custom directive simply replaces the element for which it is activated. AngularJS application during bootstrap finds the matching elements and do one time activity using its compile() method of the custom directive then process the element using link() method of the custom directive based on the scope of the directive

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AngularJS Interview Questions

Which directive is used to hide elements from the html dom by removing them from that dom and not changing their styling?

0 Answers  


What is An Auto Bootstrap Process in AngularJS?

0 Answers  


Can we create our own directives?

0 Answers  


What is route guard?

0 Answers  


What is different between ng routing and ui routing in angularjs?

0 Answers  






What does this line do? @Hostbinding(‘[class.valid]’) is valid?

0 Answers  


Is angular harder than react?

0 Answers  


In which language, angularjs is written?

0 Answers  


How to install angular 4? Explain

0 Answers  


Where is angular used?

0 Answers  


Explain the angularjs factory?

0 Answers  


What is difference between $evalAsync and $timeout?

0 Answers  


Categories