blob: 7a321f73675428246312ae6b6181c7a5bf87f738 [file] [log] [blame]
Michael Landoed64b5e2017-06-09 03:19:04 +03001//import './app/app.ts';
2import {ng1appModule} from './app/app';
3import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
4import {enableProdMode} from '@angular/core';
5import {AppModule} from './app/ng2/app.module';
6import {UpgradeModule} from '@angular/upgrade/static';
7import {IAppConfigurtaion} from "./app/models/app-config";
8
9declare var __ENV__: string;
10export declare var sdc2Config: IAppConfigurtaion;
11
12if (__ENV__==='prod') {
13 sdc2Config = require('./../configurations/prod.js');
14 enableProdMode();
15} else {
16 sdc2Config = require('./../configurations/dev.js');
17}
18
19// Ugliy fix because the cookie recieved from webseal change his value after some seconds.
20declare var __ENV__: string;
21let timeout:number = 5000;
22if (__ENV__==='dev'){
23 timeout=0;
24}
25window.setTimeout(()=>{
26 platformBrowserDynamic().bootstrapModule(AppModule).then(platformRef => {
27 const upgrade = platformRef.injector.get(UpgradeModule) as UpgradeModule;
28 upgrade.bootstrap(document.body, [ng1appModule.name], {strictDi: true});
29 });
30},timeout);