Skip to content
Snippets Groups Projects
Commit ad098f09 authored by thibault.capt's avatar thibault.capt
Browse files

(feat): change config for using http

parent a85e88da
Branches master
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ import { provideRouter } from '@angular/router'; ...@@ -4,7 +4,7 @@ import { provideRouter } from '@angular/router';
import { routes } from './app.routes'; import { routes } from './app.routes';
import { provideHttpClient } from '@angular/common/http'; import { provideHttpClient } from '@angular/common/http';
import { TodoService } from '@core/ports/todo.service'; import { TodoService } from '@core/ports/todo.service';
import { InMemoryTodoService } from '@core/adapters/in-memory-todo.service'; import { HttpTodoService } from '@core/adapters/http-todo.service';
export const appConfig: ApplicationConfig = { export const appConfig: ApplicationConfig = {
providers: [ providers: [
...@@ -14,17 +14,7 @@ export const appConfig: ApplicationConfig = { ...@@ -14,17 +14,7 @@ export const appConfig: ApplicationConfig = {
{ {
provide: TodoService, provide: TodoService,
useFactory: () => new InMemoryTodoService(), useFactory: () => new HttpTodoService(),
}, },
/*{
provide: TodoService,
useFactory: () =>
new InMemoryTodoService().withTodos([
new TodoBuilder().withId(1).withName('Apprendre Angular 19').uncomplete().build(),
new TodoBuilder().withId(2).withName('Apprendre Java Spring Boot').complete().build(),
new TodoBuilder().withId(3).withName('Apprendre PostgreSQL').uncomplete().build(),
]),
},*/
], ],
}; };
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment