Код: Выделить всё
@Component({
selector: 'app-angular-js',
template: ''
})
export class AngularJSComponent implements OnInit, OnDestroy {
constructor(
private lazyLoader: LazyLoaderService,
private elRef: ElementRef
) {}
ngOnInit() {
this.lazyLoader.load(this.elRef.nativeElement);
}
ngOnDestroy() {
this.lazyLoader.destroy();
}
}
< /code>
route < /p>
{
matcher: isAngularJSUrl,
component: AngularJSComponent,
canActivate: [OperationKeyGuard]
}
< /code>
appmodule < /p>
@NgModule({
declarations: [AppComponent],
imports: [...IMPORTS],
providers: [...PROVIDERS],
bootstrap: [AppComponent]
})
export class AppModule implements DoBootstrap {
constructor(private readonly upgrade: UpgradeModule) {}
ngDoBootstrap() {
this.upgrade.bootstrap(document.body, [MyAppJs], { strictDi: true });
}
}
Подробнее здесь: https://stackoverflow.com/questions/794 ... ot-working
Мобильная версия