angular create show unshow text code example
Example 1: angular.io hide
<div [style.visibility]="(numberOfUnreadAlerts == 0) ? 'hidden' : 'visible' ">
COUNTER: {{numberOfUnreadAlerts}}
</div>
Example 2: angular show element in component
isShown: boolean;
ngOnInit(){
isShown = false; //hidden every time subscribe detects change
}
toggleShow() {
this.isShown = ! this.isShown;
}