Last active
April 30, 2018 16:58
-
-
Save vivainio/35749c7e33796fb81e80edcde5633861 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
class PostsReaderComponent { | |
ngOnInit() { | |
const disposer = startObservers(null, "PostsReader.", [ | |
[ | |
"Loading", | |
() => { | |
this.loading = this.postsService.getPost(this.docId) != null | |
} | |
], | |
[ | |
"Data", | |
() => { | |
this.postData = this.postService.getPostAndAuthor(this.docId) | |
} | |
] | |
]); | |
addComponentDisposer(this, disposer); | |
} | |
ngOnDestroy() { | |
stopObserving(this); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment