Skip to content

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

@tohagan

Description

@tohagan

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions