-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathapp.module.ts
35 lines (32 loc) · 1.17 KB
/
app.module.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
import { Routes } from '@angular/router';
import { NodeguiLibModule } from '../../projects/angular-nodegui/src/lib/nodegui-lib.module';
import { AppComponent } from './app.component';
import { HelloComponent } from './hello/hello.component';
import { GithubService } from './github.service';
import { NodeguiRouterModule } from '../../projects/angular-nodegui/src/lib/router/router.module';
import { HomeComponent } from './home/home.component';
import { AboutComponent } from './about/about.component';
const appRoutes: Routes = [
{ path: 'home', component: HomeComponent },
{ path: 'about', component: AboutComponent }
];
@NgModule({
declarations: [AppComponent, HelloComponent, HomeComponent, AboutComponent],
imports: [
NodeguiLibModule,
HttpClientModule,
NodeguiRouterModule.forRoot(appRoutes)
],
providers: [
GithubService
// {
// provide: HttpClient,
// useFactory: () => new HttpClient(new HttpFetchBackend()) // TODO: not work
// }
],
bootstrap: [AppComponent],
schemas: [NO_ERRORS_SCHEMA]
})
export class AppModule {}