Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //our root app component
- import {Component, NgModule} from '@angular/core'
- import {BrowserModule} from '@angular/platform-browser'
- @Component({
- selector: 'my-app',
- template: `
- <div>
- <h2>Hello {{name}}</h2>
- </div>
- `,
- })
- export class App {
- constructor() {
- this.name = 'app'
- }
- }
- @Component({
- selector: 'my-app2',
- template: `
- <div>
- <h2>Hello {{name}}</h2>
- </div>
- `,
- })
- export class App2 {
- constructor() {
- this.name = 'app2'
- }
- }
- @NgModule({
- imports: [ BrowserModule ],
- declarations: [ App, App2 ],
- entryComponents: [ App, App2 ]
- })
- export class AppModule {
- ngDoBootstrap(appRef:ApplicationRef){
- appRef.bootstrap(App);
- appRef.bootstrap(App2);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement