Conditional import of Electron/NodeJS libs - The app can be launch in browser mode

This commit is contained in:
Maxime GRIS
2017-05-06 00:44:59 +02:00
parent 9d43304b67
commit c434f8a8b0
9 changed files with 59 additions and 12 deletions

View File

@@ -1,13 +1,17 @@
import 'zone.js';
import 'reflect-metadata';
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { AppComponent } from './app.component';
import { HomeComponent } from './home/home.component';
import { HomeComponent } from './components/home/home.component';
import { AppRoutingModule } from './app-routing.module';
import { ElectronService } from './providers/electron.service';
@NgModule({
declarations: [
AppComponent,
@@ -19,7 +23,7 @@ import { AppRoutingModule } from './app-routing.module';
HttpModule,
AppRoutingModule
],
providers: [],
providers: [ElectronService],
bootstrap: [AppComponent]
})
export class AppModule { }