Attribute directive changes the look or behaviour of a DOM element and these directives look like regular HTML attributes in templates. ngModel directive used for two-way is an example of an attribute directive. Below are some of the other attribute directives:
Below example describes the use of attribute directives in Angular 2:
Above code includes below configuration options:
To run the code, TypeScript(.ts) files are needed which should be saved under the app folder.
Now create a component in TypeScript(.ts) file which creates a view for the component.
Below steps can be carried out to see how above code works:
OR this file can be run in another way:
Angular 2 Related Interview Questions
|PHP Interview Questions||Angular JS Interview Questions|
|Ext JS Interview Questions||Django Interview Questions|
|Java Abstraction Interview Questions||Angular Material Interview Questions|
|Phonegap Interview Questions||MongoDB Interview Questions|
|Angular 5 Interview Questions||Angular 4 Interview Questions|
|Angular 6 Interview Questions||Angular 7 Interview Questions|
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.