app.module
--template.module (only available if people login)
--auth.module (login component)
I put in the shared.module
`@NgModule({
imports: [],
exports: [
CommonModule,
NgSlimScrollModule
],
declarations: []
})
export class SharedModule {
}`
and then I import the shared.module only in template.module. No problem with ng serve.
When I try to compile with: ng build --aot it fails with
ERROR in Can't export value NgSlimScrollModule in S:/app/node_modules/ngx-slimscroll/index.d.ts from SharedModule in S:/app/src/app/shared/shared.module.ts as it was neither declared nor imported!
ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in 'S:\app\src'
@ ./src/main.ts 4:0-74
@ multi ./src/main.ts
Hi, I've this project structure
I put in the shared.module `@NgModule({ imports: [], exports: [ CommonModule, NgSlimScrollModule ], declarations: [] }) export class SharedModule {
}`
and then I import the shared.module only in template.module. No problem with ng serve.
When I try to compile with: ng build --aot it fails with
ERROR in ./src/main.ts Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in 'S:\app\src' @ ./src/main.ts 4:0-74 @ multi ./src/main.ts
My Environment:
"dependencies": { "@angular/animations": "^4.1.0", "@angular/common": "^4.1.0", "@angular/compiler": "^4.1.0", "@angular/core": "^4.1.0", "@angular/forms": "^4.1.0", "@angular/http": "^4.1.0", "@angular/platform-browser": "^4.1.0", "@angular/platform-browser-dynamic": "^4.1.0", "@angular/router": "^4.1.0",