I am trying hidde the alerts of clarity in 2-3 seconds but with this code t doesn't show , and I don't understand.
import { Observable} from 'rxjs/Rx';
public timerAlert: boolean = false;
ngOnInit() {
let timer = Observable.timer(2000, 3000);
timer.subscribe( () => {
this.timerAlert = true; --> with this line My alert doesn't show.
});
}
Html
<clr-alert [(clrAlertClosed)]="timerAlert" [clrAlertClosable]="false" [clrAlertType]="'alert-danger'" *ngIf="errorServer">
<clr-alert-item>
<span class="alert-text">
{{ this.myMessage.message }}
</span>
</clr-alert-item>
</clr-alert>
[clrAlertClosable]="false" for hidde 'x' in Alert.
[(clrAlertClosed)]="timerAlert" with this, I should show or not the alert.