Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
What are the attributes can be used during creation of a new AngularJS Directives?
Home
AngularJS Packaging and Testing
What are the attributes can be used during creation of a new AngularJS Directives?
0
votes
asked
May 21, 2022
in
AngularJS Packaging and Testing
by
sharadyadav1986
What are the attributes can be used during creation of a new AngularJS Directives?
angularjs-directives
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
May 21, 2022
by
sharadyadav1986
Following are the list of attributes in AngularJS:
Restrict: This attribute consists of value "A" (directives to be triggered on the attribute name), "E" (only match element name), “C” (only match class name) and “M” (only match the comment name).
TemplateUrl: The templateUrl attribute tells the AngularJS HTML compiler to replace custom directive inside a template with HTML content.
Template: It specify an inline template as a string. Not used if you’re specifying your template as a URL.
Replace: It has two values true or false. If true, replace the current element. If false or unspecified, append this directive to the current element.
Transclude: It moves the original children of a directive to a location inside the new template.
Scope: It create a new scope for this directive rather than inheriting the parent scope.
Controller: It create a controller which publishes an API for communicating across directives.
Require: It require that another directive be present for this directive to function correctly.
Link: It modify resulting DOM element instances, add event listeners, and set up data binding.
Compile: It modify the DOM template for features across copies of a directive, as when used in other directives.
...