Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///// With this it gives me the error.
- const posts = data[1].posts;
- posts.map(post => {
- if (post.id === this.id) {
- this.postIWant = post.fileText;
- }
- });
- /////////////////////////////////////
- ////// The old way didnt.
- /// OLD way below
- this.postsSub = this.postsService
- .getPostUpdateListenerTwo()
- .subscribe((posts: Post[]) => {
- this.posts = posts;
- this.posts.map(post => {
- if (post.id === this.id) {
- this.postIWant = post.fileText;
- }
- });
- });
Add Comment
Please, Sign In to add comment