router icon indicating copy to clipboard operation
router copied to clipboard

Question: Using the router with ActivatedRoute snapshot

Open aleksey-shishkevich opened this issue 8 years ago • 0 comments

Can I get access to route params and data within this.router$.subscribe(...)? More precisely can I be sure using next code

constructor(private route: ActivatedRoute, ...) {
    this.router$.subscribe(
        res => {
            console.log(res, this.route.snapshot.params, this.route.snapshot.data);
            .....

this.route.snapshot.params and this.route.snapshot.dataare matching res?

aleksey-shishkevich avatar Mar 24 '17 14:03 aleksey-shishkevich