Skip to content

How to (1) access the destination route (2) handle abstract routes #3

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

Open
tohagan opened this issue May 7, 2016 · 1 comment
Open

Comments

@tohagan
Copy link

tohagan commented May 7, 2016

Love this new middleware. After coding a new NodeJS backend it got me thinking that really Angular needed middleware too ... and here it is 👍 . I'd propose it be part of Angular core.

What I think the documentation lacks is ...

  • A demonstration of how to access the destination path or route. Often you want to apply an Aspect Oriented middleware rule that will include or exclude a pattern of route names or path names or parameter names. I'm not sure if params includes all of these so an example of how to do this would be very valuable.
  • You often want to apply this to an abstract ui route so that a whole set of sub routes will have consistent middleware injected. This is really just a specialization of the pattern case but I think this very common case needs an example. It was what I went hunting for first when I looked over your documentation.

Adding these powerful examples should really help sell your concept.

@karlhepler
Copy link
Owner

@tohagan I think your ideas are great. I'll see what I can do about working them in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants