Last active
December 17, 2019 01:03
-
-
Save fireflysemantics/f57c67644da2a46d629461dba3d4d18a to your computer and use it in GitHub Desktop.
This file contains 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
import { ACTIVE_MENU_KEY, MENU_ITEMS } from './model'; | |
import { Injectable, OnDestroy } from '@angular/core'; | |
import { OStore} from "@fireflysemantics/slice"; | |
import { Observable } from "rxjs"; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class StateService { | |
public ostore:OStore = new OStore(); | |
public activeMenu$:Observable<string>; | |
constructor() { | |
this.ostore.post( | |
ACTIVE_MENU_KEY, | |
MENU_ITEMS.BLOG); | |
this.activeMenu$ = this.ostore.observe(ACTIVE_MENU_KEY); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment