Skip to content

Add a way to process routes before rendering#736

Merged
SanderElias merged 5 commits intomainfrom
sander/handledRouteextension
Jul 13, 2020
Merged

Add a way to process routes before rendering#736
SanderElias merged 5 commits intomainfrom
sander/handledRouteextension

Conversation

@SanderElias
Copy link
Copy Markdown
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Other... Please describe:

What is the current behavior?

There is no way to alter the handledRoutes array

Issue Number: closes #700

What is the new behavior?

It exposes a new type plugin processRoutes, that can be used to make changes to the handledRoutes array.
the plugin receives, and should return an HandeledRoute[]. No rendering will take place before those plugins are done.
When you register a processRoute plugin you can give it a priority, the lowest priority gets called first. Defaults to 100

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@SanderElias SanderElias self-assigned this Jul 13, 2020
@SanderElias SanderElias merged commit 3098354 into main Jul 13, 2020
@SanderElias SanderElias deleted the sander/handledRouteextension branch July 13, 2020 13:44
SanderElias pushed a commit that referenced this pull request Jul 14, 2020
remove eslint deactivation as there is no more explicit any with #736 changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compatibility with ngx-translate-router

2 participants