| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- import 'core-js/es6/reflect';
- import 'core-js/es7/reflect';
- import 'reflect-metadata';
- import 'zone.js';
- import app from './app-js';
- import {
- APP_BOOTSTRAP_LISTENER,
- ApplicationRef,
- ComponentRef,
- NgModule,
- } from '@angular/core';
- import {BrowserModule} from '@angular/platform-browser';
- import {UpgradeModule} from '@angular/upgrade/static';
- import {BootstrapComponent} from 'hslayers-ng/bootstrap.component';
- import {HsCoreModule} from 'hslayers-ng/components/core/core.module';
- import {AdjusterModule} from './adjuster';
- import {AppService} from './app.service';
- @NgModule({
- imports: [BrowserModule, UpgradeModule, HsCoreModule, AdjusterModule],
- exports: [],
- declarations: [/*MyCoolComponent, MyHotComponent*/],
- entryComponents: [/*MyCoolComponent, MyHotComponent*/],
- providers: [
- {
- provide: APP_BOOTSTRAP_LISTENER,
- multi: true,
- useFactory: () => {
- return (component: ComponentRef<BootstrapComponent>) => {
- //When ng9 part is bootstrapped continue with AngularJs modules
- component.instance.upgrade.bootstrap(
- document.documentElement,
- [app.name],
- {strictDi: true}
- );
- };
- },
- },
- AppService,
- ],
- })
- export class AppModule {
- constructor() {}
- ngDoBootstrap(appRef: ApplicationRef): void {
- //First bootstrap Angular 9 app part on hs element
- appRef.bootstrap(BootstrapComponent);
- }
- }
|