-
Notifications
You must be signed in to change notification settings - Fork 3k
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
State 'x' is already defined #3326
Comments
I believe I've isolated the issue. It appears to be a change in the behavior of ui-router once If I have two modules: //app/foo/foo.module.ts
import { NgModule } from '@angular/core';
import { UIRouterModule } from 'ui-router-ng2';
import FooComponent from './foo.component';
@NgModule({
imports: [
UIRouterModule.forChild({ states: [
{
name: 'foo',
url: '/foo',
component: FooComponent
}
]),
],
declarations: [],
exports: [],
providers: [],
})
export default class FooModule { } //app/bar/bar.module.ts
import { NgModule } from '@angular/core';
import { UIRouterModule } from 'ui-router-ng2';
import FooModule from '../foo/foo.module';
import BarComponent from './bar.component';
@NgModule({
imports: [
UIRouterModule.forChild({ states: [
{
name: 'bar',
url: '/bar',
component: BarComponent
}
]),
FooModule,
],
declarations: [],
exports: [],
providers: [],
})
export default class BarModule { } In this case I receive a runtime error stating |
Closing in favor of ui-router/angular#42 |
EDIT: I've filed this issue with the
ui-router/ng2
repository. Please close this issue if it's preferred to have new issues in said repo.I'm running
[email protected]
. I have several states defined, and my application has been running fine until now. However, today I started getting the following error:passwordReset
is not defined anywhere else. Once I remove that particular state, the app works normally, with all the other states I defined in the exact same manner.The text was updated successfully, but these errors were encountered: