angular change component on click hide code example
Example 1: hide button in typescript
var link = document.getElementById('nav-ask');
link.style.display = 'none'; //or
link.style.visibility = 'hidden';
Example 2: angular show element in component
isShown: boolean;
ngOnInit(){
isShown = false; //hidden every time subscribe detects change
}
toggleShow() {
this.isShown = ! this.isShown;
}