Skip to content
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

Add a way to process routes before rendering #736

Merged
merged 5 commits into from
Jul 13, 2020

Conversation

SanderElias
Copy link
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