Angular CLI ERROR in Cannot read property 'loadChildren' of null

前端 未结 11 2274
青春惊慌失措
青春惊慌失措 2021-01-01 12:24

I\'m converting a project to use angular cli and everything is working (once it\'s build) but i\'ve got a weird behaviour during build.

with ng serve I

11条回答
  •  Happy的楠姐
    2021-01-01 13:09

    I had the same error, but my requirement was to have all the routes in a separate file. I solved it by simply exporting my Routes[] like this:

    export const routes: Routes = [
     // ... all my route objects
    ];
    

提交回复
热议问题