-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import BusyModule in my module,all routers loadChildren can not use #60
Comments
my angular version is 4.1.3 |
We must not provide Compiler as JitCompiler. Instead we must provide and inject the Compiler2 extends Compiler. |
yes @apoterenko that was the solution, I created a new CustomCompiler extends Compiler, and I replaced it in the busy component and the aot compilation works I will try to create a MR tomorrow. I did the commit in here tixif-ni@6bdb334 Also I created https://www.npmjs.com/package/tixif-ngx-busy for testing Regards. |
@Xepe, can you please explain why do you need to Compiler to make JIT compiler work in AOT? |
@ipassynk I am not totally sure, the issue that I found is because the JIT Compiler is set for the Compiler and for JIT is ok but for AOT it does not work, I got some error like "the compiler is not loaded", for that reason I created a extends of Compiler and I setup that customCompiler where the component need it. |
I am having the same issue. will it be fixed in near future? |
@Xepe maybe you can add here the customCompiler example ? |
it is AppModule
@NgModule({
declarations: [
AppComponent,
LoginComponent
],
imports: [
BrowserModule,
FormsModule,
HttpModule,
CommonModule,
BrowserAnimationsModule,
BusyModule,
RouterModule,
RouterModule.forRoot(indexRoutes)
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
it is Router
export const indexRoutes: Routes = [
{
path: '',
redirectTo: '/login.html',
pathMatch: 'full'
},
{
path: 'login.html',
component: LoginComponent
},
{
path: 'test',
loadChildren: './test/index.module#IndexModule'
}
];
it is my project
when use ng serve --prod start
i find all loadChildren can not use,
How to solve?
The text was updated successfully, but these errors were encountered: