Angular 2 Pipes are the new way to Transform Data. They are similar to Filters in AngularJS. In this Tutorial we are going to look at what is pipes are & how to use them. We will see how to pass arguments to the pipe and how to chain pipes. We are also going to look at the few of the angular 2 built in pipes like currency pipe, date pipe, number pipe, percent pipe, decimal pipe, slice pipe.
The ngStyle directive allows you to modify the style of an HTML element using the expression. In this tutorial, we will look how to use ngStyle with few examples. Using ngStyle you can dynamically change the style of your HTML element. You also can bind these properties to components properties.
ngClass Directive is an Angular 2 Attribute Directive, which allows us to add or remove CSS classes to an HTML element. Using ngClass you can create dynamic styles in HTML pages.
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.
The ngSwitch is an Angular 2 structural directive, which allows us to Add/Remove DOM Element.It is similar to switch statement of C#. In this tutorial, we will look at the syntax of ngSwitch . We will show you how to use ngSwitch using an example code.