Merge pull request #30 from AlineRinquin/isa

lili
This commit is contained in:
AlineRinquin 2022-02-16 15:45:23 +01:00 committed by GitHub
commit a9970a50eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 39 deletions

View File

@ -15,7 +15,7 @@
(keyup.enter)="addTache(todo.id)"
/>
{{todo}}
<div class="element" *ngFor="let tache of todo.taches">
<div class="element-gauche">

View File

@ -34,32 +34,12 @@ export class ToDoListComponent implements OnInit {
}
ngOnInit(): void {
//this.refreshTodo();
this.beforeEditCache = '';
this.casesRestantes=true;
this.filter='tous';
this.idTodo = 4;
this.todoTitle = '';
/* this.todos = [
{
id: 1,
texte: 'Finish Angular Screencast',
etat: false,
editing: false,
},
{
id: 2,
texte: 'Take over world',
etat: false,
editing: false,
},
{
id: 3,
texte: 'One more thing',
etat: false,
editing: false,
},
]; */
}
//ajouter tache
@ -76,23 +56,8 @@ console.log(idTodoList);
this.TodoService.addTache(tache,idTodoList).subscribe((resp)=>{
window.location.reload();
})
/* if (this.todoTitle.trim().length === 0) {
return;
}
this.todos.push({
id: this.idTodo,
title: this.todoTitle,
completed: false,
editing: false,
});
this.todoTitle = '';
this.idTodo++; */
}
/* if (contact.nom !== '') {
this.repertoireService.addContact(contact).subscribe((resp) => {
this.router.navigate(['repertoire/']);
}); */
//modifier la tâche

View File

@ -25,7 +25,7 @@ export class TodoService {
}
addTache(newtache: Tache,idTodoList:number): Observable<any> {
console.log(newtache);
console.log(newtache +'gkggg');
return this.http.post(`${this.apiUrl}/taches/add/${idTodoList}`, newtache);
}
}