How to get rid of the warning .ts file is part of the TypeScript compilation but it's unused

后端 未结 16 1151
天命终不由人
天命终不由人 2020-12-30 18:20

I Just updated angular to latest 9.0.0-next.4. I am not using routing but suddenly after updating I keep seeing this warning. How Do I remove this warning

16条回答
  •  清歌不尽
    2020-12-30 19:02

    For me, the problem was that I was using:

    loadChildren: () => import('./components/admin/_admin.module').then(m => m.AdminModule)
    

    in my routes.ts file but wasn't importing module. So if I just put

    import { AdminModule } from './components/admin/_admin.module';
    

    it solves it.

提交回复
热议问题