How to be inside a subscribe in Karma angular 6 ?
this.watcher = this.media.subscribe((change: MediaChange) => {
this.activeMediaQuery = change ? `'${change.mqAlias}' = (${change.mediaQuery})` : '';
this.changeMqAlias = change.mqAlias;
if (this.changeMqAlias == 'xs' || this.changeMqAlias == 'sm' || this.changeMqAlias == 'xl') {
if (this.id) {
this.get(this.id);
}
}
});
Aucun commentaire:
Enregistrer un commentaire