What are custom directives?

devquora
devquora

Posted On: Feb 22, 2018

 

Angular provides the ability to create our own directives to implement our own custom templates or logic in our web application.

For example: Say you have a template consisting of some text boxes and a submit button which is getting used in every single page of your website. Inorder to reduce the re-work, we can simply create our directive which will produce the template when the custom directive is used as an attribute or an element in an html page. In this way we can create and apply a custom directive whic are very useful.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    AngularJS Basic Interview Questions

    What is AngularJS?

    AngularJS is a javascript framework which helps in developing web applications in MVC architectural pattern & SPA or..

    AngularJS Basic Interview Questions

    What are angular directives?

    Angular directives are the attributes which are decorated on the html tags or elements of an html page. Directives have ..

    AngularJS Basic Interview Questions

    What is the use of restrict and template property when creating custom directives?

    Custom directives gives us the ability to create our own directives. Its restriction property helps us to enforce the de..