Created
March 8, 2019 10:03
-
-
Save ngohungphuc/8d12846d78ca0661382f056e3a21dcab to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public user$: IUser; | |
private userStoreSubscription: Subscription = new Subscription(); | |
constructor(private store: Store<UserState>) {} | |
ngOnInit(): void { | |
this.userStoreSubscription = this.store.select(getUser).subscribe(res => { | |
this.user$ = res; | |
}); | |
} | |
ngOnDestroy(): void { | |
this.disabledUndoButtonSubscription.unsubscribe(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment