ng-hot-reload
ng-hot-reload copied to clipboard
Make it work for hybrid app
I added some angular 7 components in my project.
ng-hot-reload
doesn't refreshing these components. do you have an idea how can I make it work?
index.js:
import {AppModule} from './application/app.module';
platformBrowserDynamic().bootstrapModule(AppModule);
app.module:
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { UpgradeModule } from '@angular/upgrade/static';
import {WhiteLabelComponent} from "./components/white-label/whiteLabel.component";
@NgModule({
imports: [
BrowserModule,
UpgradeModule
],
declarations:[
WhiteLabelComponent
],
entryComponents:[
WhiteLabelComponent
]
})
export class AppModule {
constructor(private upgrade: UpgradeModule) { }
ngDoBootstrap() {
this.upgrade.bootstrap(document.body, ['mainModule'], { strictDi: true });
}
}
angular 7 component: import {Component, OnInit} from '@angular/core';
@Component({
selector: 'white-label',
template: require('./white-label.html')//template
})
export class WhiteLabelComponent implements OnInit {
appTitle: string = 'myapp';
}