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

Invalid language on URI #22

Closed
brunosalgado opened this issue Feb 7, 2017 · 1 comment
Closed

Invalid language on URI #22

brunosalgado opened this issue Feb 7, 2017 · 1 comment
Assignees
Labels

Comments

@brunosalgado
Copy link

If I set a different language on URI, there isn't on configuration file(locales.json), my application crashes.

There routers for 404:
{path: '404', component: NotFoundComponent},
{path: '**', redirectTo: '404'}

But localize-router put this routers inside children language route.
For example:
{path: '', redirectTo: 'en', pathMatch: 'full'}
{path: 'en', children: [
{path: '404', component: NotFoundComponent},
{path: '**', redirectTo: '404'}
]}

@meeroslav meeroslav self-assigned this Feb 8, 2017
@meeroslav meeroslav added the bug label Feb 8, 2017
@Masquer
Copy link

Masquer commented Feb 9, 2017

As a workaround you can add a root path redirect after the localize-router was initialized.
like this: this.router.config.push({ path: '**', redirectTo: 'en/404' });
('router' is an instance of Router)

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

No branches or pull requests

3 participants