O'Reilly logo

Learning Angular for .NET Developers by Rajesh Gunasundaram

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Attribute directives

An attribute directive will be added like an attribute to existing HTML elements, and this can alter or extend the behavior of HTML elements. For example, an ngModel directive, if added to an input element, will extend it by updating its value property and also by responding to change events:

<input [(ngModel)]="author.name">

We can also write our own directives apart from using existing ones, such as ngSwitch, ngStyles, and ngClass.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required