try to read the id like that :

ngOnInit() {
    this.sub = this.route.params.subscribe(params => {
       this.id = +params['id']; // (+) converts string 'id' to a number

       // In a real app: dispatch action to load the details here.
    });
  }


Le 25 mai 2018 7:22 PM, "Mandar Kirad" <[email protected]> a écrit :

> hello all,
>
> I have develop angular project using angular 4 CLI.
>
> My problem is that , i have pass a id using route params using this syntax
>
> in another component file
> "this.router.navigate(['meeting/'+ id])"
>
> and i have get this id using this,
>
> let id=this.activatedRoute.snapshot.params['id']
>
> this all are working fine at running this application, refresh on that
> meeting/:id page  is working,
>
> But when a create a build of this project , that dist folder can not
> getting refresh on meeting/:id page,
>
> It gives following error,
> *inline.dd650ebf6f8c0fe6ad8e.bundle.js:1 Uncaught SyntaxError: Unexpected
> token <*
> *polyfills.a2db176b80765ff39ae2.bundle.js:1 Uncaught SyntaxError:
> Unexpected token <*
> *scripts.1cd05d3e7f9761ff7fcc.bundle.js:1 Uncaught SyntaxError: Unexpected
> token <*
> *vendor.ed4e3f60a7d8e487463e.bundle.js:1 Uncaught SyntaxError: Unexpected
> token <*
> *main.7d1caf3d1933a8038bf1.bundle.js:1 Uncaught SyntaxError: Unexpected
> token <*
>
>
> *Kindly please let me know *
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Angular and AngularJS discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to