Last active
September 24, 2018 20:18
-
-
Save NetanelBasal/50813cb131003a68329f9994f08bf3c7 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
export class PageOneComponent { | |
subscription: Subscription; | |
constructor(private demoQuery: DemoQuery) {} | |
ngOnInit() { | |
this.subscription = this.demoQuery.selectSomeProp$.subscribe(prop => { | |
this.someMethod(); | |
}); | |
} | |
someMethod() {} | |
} |
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
@Component({ | |
template: `<button (click)="update()">Update prop</button>` | |
}) | |
export class PageTwoComponent { | |
constructor(private demoService: DemoService) {} | |
update() { | |
this.demoService.updateKey(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment