Hi
I am quite new to angular and I am trying to upgrade an app written in 
Angular 4 to 7.
This app was written in javascript also.
I have this problem:
this app has two modules, a login module which contains a LoginComponent 
and it is responsible for the login ui and a classic appmodule which 
contains every other component.
This app uses webpack, which is configured to emit two separate chunks, one 
for each of these modules.
When the app starts the LoginModule gets boostrapped.
I don't understand this bootstrapping process.
this is the login module (login.js):

'use strict';

import './login.css'

import { enableProdMode } from '@angular/core'
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
import { NgModule } from '@angular/core'

import AppModule from './app.module'
import LoginComponent from './login.component'

var LoginModule = NgModule({
imports: [ AppModule ],
bootstrap: [ LoginComponent ]
}).Class({
constructor: function LoginModule() {
}
})

if (IS_PRODUCTION_BUILD) {
enableProdMode()
}

platformBrowserDynamic().bootstrapModule(LoginModule);

And this is the index.js (which is the "app module" corresponding):

'use strict';

import './index.css'

import { enableProdMode } from '@angular/core'
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
import { NgModule } from '@angular/core'

import AppModule from './app.module'
import AppComponent from './app.component'

var IndexModule = NgModule({
imports: [ AppModule ],
bootstrap: [ AppComponent ]
}).Class({
constructor: function IndexModule() {
}
})

if (IS_PRODUCTION_BUILD) {
enableProdMode()
}

platformBrowserDynamic().bootstrapModule(IndexModule);

In the 7 version there is a main.ts, but I don't find a main in the 4 
version.
So my problems are two:
1. how does the old app bootstrap process work?
2. how to replicate it in the new one?

thanks for any help
bye
nicola

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to