ngIf

Angular ngClass Add CSS Class to HTML elements
Angular

NgClass Example Conditionally apply class

The Angular ngClass Directive is an Angular Attribute Directive, which allows us to add or remove CSS classes to an HTML element. ngClass makes adding a conditional class to an element easier, hence dynamically changing the styles at runtime. We can also add multiple CSS Classes.

Angular ngIf then else Directive by Example
Angular

How to use ngIf, else, then in Angular By example

The ngIf is an Angular 2 Structural Directive, which allows us to Add/Remove DOM Element. It is similar to ng-if directive of AngularJs. In this Tutorial let us look at the syntax of ngIf. We will show you how to use ngIf using an example code.

Angular 2 Directives
Angular

Angular Directives

In this Introduction to Angular Directive, we are going to look at the Angular Directives. We will look at three types of directives that Angular supports like Component, Structural and Attribute Directives. We also look at the few of the most commonly used Angular directives.

Scroll to Top