-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.module.ts
43 lines (42 loc) · 1.32 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
36
37
38
39
40
41
42
43
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { HttpModule } from '@angular/http';
import { HttpClientModule } from '@angular/common/http';
//Genel Componentler
import { AppComponent, ProductComponent, NavbarComponent, NotFoundComponent, HomeComponent } from '../app/components';
//Account Componentler
import { LoginComponent, RegisterComponent } from '../app/account/account-component';
//Genel Servisler
import { ApiService } from '../services/services';
@NgModule({
declarations: [
AppComponent,
ProductComponent,
NavbarComponent,
NotFoundComponent,
HomeComponent,
LoginComponent,
RegisterComponent,
],
imports: [
BrowserModule,
HttpModule,
HttpClientModule,
RouterModule.forRoot([
{ path: '', redirectTo: 'home', pathMatch: 'full' },
{ path: 'home', component: HomeComponent },
{ path: 'product', component: ProductComponent },
{ path: '404', component: NotFoundComponent },
{ path: '**', redirectTo: '/404' }
])
],
providers: [
{
provide: "apiUrl", useValue: "/api" //api servis içerisindeki tüm http istekleri bu adrese yönlendirilir.
},
ApiService
],
bootstrap: [AppComponent, NavbarComponent]
})
export class AppModule { }