show hid using css on click angular code example
Example 1: hide and show in angular 8
isShown: boolean = false ; // hidden by default
toggleShow() {
this.isShown = ! this.isShown;
}
Example 2: angular show element in component
isShown: boolean;
ngOnInit(){
isShown = false; //hidden every time subscribe detects change
}
toggleShow() {
this.isShown = ! this.isShown;
}