-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Route Config "as" or "name" property #346
Comments
The fix is really easy. As the error stated you should provide either |
I tried with both cases, the Just found out that using 'name' does indeed work, I forgot to put a # in the url http://localhost:3000/#/test. Thanks for your help. |
Never mind the question: The answer was that default with webpack the HashLocationStrategy is used, changed to PathLocationStrategy to get the correct result. bootstrap(BootAuth, [
...ENV_PROVIDERS,
...HTTP_PROVIDERS,
...ROUTER_PROVIDERS,
provide(LocationStrategy, {useClass: PathLocationStrategy})
]) |
When using the DevServer of Webpack with a setup RouteConfig, I'm getting an error about both "as" and "name" property being set of a RouteDefinition, which I haven't.
webpack.config.js has not been changed from the default.
Code of normalizeRouteConfig: where the error comes from
Component with RouteConfig
Basic component
Anyone any idea how to fix this error?
The text was updated successfully, but these errors were encountered: