angular 2 [hidden]

Angular 2 hidden property

Angular 2 [hidden] is  a special case binding to hidden property.

It is closest cousin of ng-show and ng-hide .

It is more powerful and use to bind any property of elements. Both the ng-show and ng-hide are used to manage the visibility of elements using ng-hide css class. It is also set the display property "display:none".

All the above features are supported in Angular 2 but added some extra feature like animations etc.

Example for Angular 2

<div [hidden]="!active">
    Hello, This is active!

Example for Angular 1

<div ng-show="active">
    Hello, This is active!

About blogger..


Hey! I am Anil Singh. I am Active Blogger, Writer and Programmer. I love learning new technologies, programming, blogging and participating the forum discussions more...

Post a Comment Powered by Blogger.