0 votes
in AngularJS Packaging and Testing by
What are the attributes can be used during creation of a new AngularJS Directives?

1 Answer

0 votes
by

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.

Related questions

0 votes
asked Dec 16, 2023 in Angular by AdilsonLima
0 votes
asked May 21, 2022 in AngularJS Packaging and Testing by sharadyadav1986
...