Angular src restructured as modular as per angular official guidelines, .travis.yml support added for node 12
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import 'reflect-metadata';
|
||||
import '../polyfills';
|
||||
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
import { HttpClientModule, HttpClient } from '@angular/common/http';
|
||||
import { CoreModule } from './core/core.module';
|
||||
import { SharedModule } from './shared/shared.module';
|
||||
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
|
||||
@@ -12,12 +14,9 @@ import { AppRoutingModule } from './app-routing.module';
|
||||
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
|
||||
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
||||
|
||||
import { ElectronService } from './providers/electron.service';
|
||||
|
||||
import { WebviewDirective } from './directives/webview.directive';
|
||||
import { HomeModule } from './home/home.module';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { HomeComponent } from './components/home/home.component';
|
||||
|
||||
// AoT requires an exported function for factories
|
||||
export function HttpLoaderFactory(http: HttpClient) {
|
||||
@@ -25,25 +24,24 @@ export function HttpLoaderFactory(http: HttpClient) {
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent,
|
||||
HomeComponent,
|
||||
WebviewDirective
|
||||
],
|
||||
declarations: [AppComponent],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
FormsModule,
|
||||
HttpClientModule,
|
||||
CoreModule,
|
||||
SharedModule,
|
||||
HomeModule,
|
||||
AppRoutingModule,
|
||||
TranslateModule.forRoot({
|
||||
loader: {
|
||||
provide: TranslateLoader,
|
||||
useFactory: (HttpLoaderFactory),
|
||||
useFactory: HttpLoaderFactory,
|
||||
deps: [HttpClient]
|
||||
}
|
||||
})
|
||||
],
|
||||
providers: [ElectronService],
|
||||
providers: [],
|
||||
bootstrap: [AppComponent]
|
||||
})
|
||||
export class AppModule { }
|
||||
export class AppModule {}
|
||||
|
||||
Reference in New Issue
Block a user