feat(router): user metadata in route configs#3541
feat(router): user metadata in route configs#3541danrasmuson wants to merge 1 commit intoangular:masterfrom
Conversation
|
Two things I'm unsure about.
|
df31fce to
86d194a
Compare
|
Thanks @danielrasmuson! Can you rebase this on master? I just landed a refactor to the router that should make this a bit easier. I think this should be attached to the handler, and that'll make it agnostic for If you get the tests passing for JS, I'll help make the Dart ones pass. No need to worry about that. |
|
Sure thing Brian. I'll work on it. |
Provide the ability to attach custom data onto a route and retrieve that data as an injectable (RouteData) inside the component. Closes angular#2777
|
Hey @btford |
|
@danielrasmuson– thanks! taking a look now. If you don't mind, I'll just amend your commit with the few fixes for Dart |
|
This landed in master. I made some changes – I removed the arbitrary type restriction, and extraneous class in favor of an opaque token for injection. See ed81cb9 for details. Thanks, @danielrasmuson! |
|
@btford If I read this correctly, the only way to access the data is to use |
|
@cexbrayat I think the reason for that is, that |
|
@PascalPrecht Right. But don't you think that having to use These differences are a bit surprising, I thought it was worth pointing out. |
|
I have to agree with @cexbrayat . |
|
@TommyM I get @cexbrayat point that it doesn't feel common that Maybe @btford can shed some light on the reasoning behind it. |
|
@PascalPrecht Yes you are right. I did mean to say that |
|
@PascalPrecht @TommyM I think we all agree. |
|
Yes, let's lean back and wait for @btford 's thoughts on this. I'm sure he'll shed some light into darkness once he can find some time. |
|
Using a @cexbrayat @TommyM @PascalPrecht I'm open to discussing this more in another issue. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Provide the ability to attach custom data onto a route and retrieve that data as an injectable (RouteData) inside the component.
Closes #2777