Posted On: Feb 22, 2018
Custom directives gives us the ability to create our own directives. Its restriction property helps us to enforce the decision of how this custom directive should be used. The restriction property takes four values as input:
These four values can also be combined and used, for example : ‘EA’ if provided as a value will allow the directive to be used as an element as well as an attribute. ‘EAC’ can also be set as a value for restrict. “template” property is used in a directive if you have to inject a template in your html page.”template” property takes an html template as an input. The main objective of this property is to reduce the re-work involved in writing same code again and again.
Never Miss an Articles from us.
AngularJS is a javascript framework which helps in developing web applications in MVC architectural pattern & SPA or..
Angular directives are the attributes which are decorated on the html tags or elements of an html page. Directives have ..
Angular provides the ability to create our own directives to implement our own custom templates or logic in our web appl..