The following attributes can be used during creation of a new AngularJS Directives,
Restrict
The restrict attribute is how AngularJS triggers the directive inside a template. The default value of the restrict option is “Aâ€. The value of “A†causes the directives to be triggered on the attribute name. Other than “Aâ€, restrict option has “E†(only match element name), “C†(only match class name) and “M†(only match the comment name) or any combination among four options.
TemplateUrl
The templateUrl attribute tells the AngularJS HTML compiler to replace custom directive inside a template with HTML content located inside a separate file. The link-Menu (say, our custom directive name) attribute will be replaced with the content of our original menu template file.
Template
Specify an inline template as a string. Not used if you’re specifying your template as a URL.
Replace
If true, replace the current element. If false or unspecified, append this directive to the current element.
Transclude
Lets you move the original children of a directive to a location inside the new template.
Scope
Create a new scope for this directive rather than inheriting the parent scope.
Controller
Create a controller which publishes an API for communicating across directives.
Require
Require that another directive be present for this directive to function correctly.
Link
Programmatically modify resulting DOM element instances, add event listeners, and set up data binding.
Compile
Programmatically modify the DOM template for features across copies of a directive, as when used in other directives. Your compile function can also return link functions to modify the resulting element instances.
Posted Date:- 2021-08-25 10:26:04
What is the digest cycle in AngularJS?
What is immediately invoked function expressions?
What is the difference between ngRoute and ui-router?
Explain the auto bootstrap process in AngularJS
Difference between AngularJS and React.JS.
Explain the concept of webpack
If both factory and service are equivalent, then when should I use them?
Difference between services and factory.
Is AngularJS well-suited with all browsers?
Is Nested Controllers possible or not in AngularJs?
What is the syntax of factory method in AngularJS?
What is typescript in Angular 8?
What are the features of Bazel?
What is BOM(Browser Object Model)?
45) What is the difference between a unit and end-to-end (e2e) test in AngularJS ?
How can you set, get, and clear cookies in AngularJS?
What is the difference between a stateful and stateless component in AngularJs ?
How to upgrade from Angular 2 to Angular 4
How to do email and Phone no. validation in AngularJS ?
What is a representational state transfer(REST) in AngularJs?
How to access parent scope from child controller in AngularJS ?
Difference between Angular and Angular JS?
What is ng-non-bindable in AngularJS?
What is the use of a double-click event in AngularJs?
What is ng-switch in AngularJS?
How to enable HTML5 mode in Angular 1.x?
What is orderby filter in AngularJS?
How can you integrate AngularJS with HTML?
What is $rootscope in AngularJS ? How is it different from the scope?
What is dependency injection In AngularJs and how does it work?
Explain how does AngularJS implement two-way binding?
Explain ng-bind-template and ng-non-bindable.
What are the attributes can be used during creation of a new AngularJS Directives?
Explain the concept of scope hierarchy
What is SPA (Single Page Application) in AngularJS?
How can we show that a scope variable should have one-time binding only?
Where can we implement the DOM manipulation in AngularJS?
What is DI (Dependency Injection) and how an object or function can get a hold of its dependencies?
What are the characteristics of "Scope"?
What is the difference between one-way binding and two-way binding in AngularJS ?