Skip to content
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

Make it work for hybrid app #16

Open
YonathanB opened this issue Feb 25, 2019 · 0 comments
Open

Make it work for hybrid app #16

YonathanB opened this issue Feb 25, 2019 · 0 comments
Assignees

Comments

@YonathanB
Copy link

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';
}

@noppa noppa self-assigned this Feb 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants