Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- constructor(private fs: FakerService, private route: ActivatedRoute) { }
- this.route.paramMap.pipe(switchMap(params => {
- const id = params.get('id'); // ID from RouterLink
- return this.fs.getMessages().pipe(map(val => val[+id - 1])
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement