New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: parammap in ng4 #216
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Syntactically LGTM.
632337d
to
d95295d
Compare
or as an Observable: | ||
|
||
this.route.paramMap | ||
.map((params: ParamMap) => params.get('ponyId')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the type necessary? Can't TS infer it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It isn't, that was just to show that there was a new type. I did the same in the ebook.
|
||
this.route.paramMap | ||
.map((params: ParamMap) => params.get('ponyId')) | ||
.switchMap(id => this.ponyService.get(id)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shoudn't we catch? or do you omit it intentionally to avoid cluttering the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I omitted it on purpose
No description provided.