Welcome Guest! (App Version 5.16)

websitnero logo name

Attribute Directives

What are Attribute Directives?

Attribute directives only do the cosmetic changes via CSS. They do not have the ability to make any change in the dom.

There are 2 main ways of doing this using the following directives:

  • ngStyle
  • ngClass

ngSwitch is also attribute directives but not used alone. This is used along with *ngSwitchCase and *ngSwitchDefault (both structural directives) to choose one of the various options to be shown on view based on logic in typescript file.

WebsiteNero is highly optimized for learning various website developing technlogies. We try our best to add maximum modules and examples to help learn the concepts clearly and vividly. We try to present all content and examples as simple as we can removing any complexity to hurdle easy understanding. We try best provide you with worthful content, but we cannot guarantee full correctness of all the content on this site. While using this website, you agree to have read and accepted all our terms of use and conditions, cookie, and privacy policy. Copyright, 2013-2018 by websitenero.com. All Rights Reserved.