Lets say we want to take `id` param out of the current url. To do so we need to obtain current route by injecting "ActivatedRoute" object and read its params.
constructor(private _route: ActivatedRoute){
this.id = _route.params.map(param => param.id);
}
The `id` field will be of Observable type.
Brak komentarzy:
Prześlij komentarz