How to create custom directives in AngularJS?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is string interpolation?

432


What is provider in angular 2?

425


What is nginclude?

448


Compare the features of AngularJS and jQuery?

997


What is the use of $locale service in angularjs?

442






What companies are using angular?

389


What is horizontal projection?

411


What do you understand by $watch?

430


Mention what are the styling form that model adds to css classes?

429


What are the differences between service and factory methods?

432


Is primefaces free?

422


What is the use of canactivate in angular?

430


What is a locale ID?

1054


Who created angular js ?

475


Does Angular use the jQuery library?

462