angular / router

The Angular 1 Component Router
MIT License
665 stars 135 forks source link

Component not found on tomcat when having same mudule file name and lazy loading #443

Open tibistibi opened 5 years ago

tibistibi commented 5 years ago

I get a component not found when lazyloading it if the file name of the module is equal even if its in different path. so this:

in my employee/employee.module.ts i have:

         {
            path: 'employee/rating',
            loadChildren: './rating/rating.module#EmployeeRatingModule'
        },

in my client/client.module.ts i have:

         {
            path: 'client/rating',
            loadChildren: './rating/rating.module#ClientRatingModule'
        },

this will not work, only one of them will be found. On my local machine it is working but after packaging and deploy to tomcat env it does not work.

this will work:

in my employee/employee.module.ts i have:

         {
            path: 'employee/rating',
            loadChildren: './rating/emp.rating.module#EmployeeRatingModule'
        },

in my client/client.module.ts i have:

         {
            path: 'client/rating',
            loadChildren: './rating/cli.rating.module#ClientRatingModule'
        },