I am trying to achieve my angular application route to split in to 3 clear part.
let Scope-Module take care of feature modules. ( at present i have 2 feature modules )
let the feature module take care of it's own feature components.
the reason to clarity and rescablility i am trying to achieve this. but getting an error as "Cannot redeclare block-scoped variable 'AppRoutes'.
"
Any one help me to sort this issue? if the way what i try is wrong, can any one please show me the correct way to achieve this?
You have AppRoutes
declared twice in your file. You should probably name one appRoutes
:
const appRoutes: Routes = [{
path:"",
pathMatch:"full",
loadChildren:() => import('./setup-config/setup-config.module').then(m => m.ScopeModule)
}]
@NgModule({
declarations: [],
imports: [
CommonModule,
ScopeModule,
RouterModule.forRoot(appRoutes, {
scrollPositionRestoration: 'enabled',
useHash: true
})
],
exports: []
})
export class AppRoutes {}