Ionic ngFor duplicates list


#1

Help guys. I am building some type of todo application that uses SQLite for storage.
My HomePage is where i show the list of todos. It looks something like *ngFor="let todo of itemList" The list shows all right but when ever i go to another page, lets say i go to the page where i add a new Todo and the process is done and i set page back to root, then the list of todos i have duplicate themselves. If i exit the app and open it again everything comes back to normal. I read about it somewhere but i am not exactly sure of the details, the person said it had to do with subscribing and unsubscribing. Thanks in advance


#2

What does your home page .ts file look like?


#3

this.todoService.read().then((response)=>{
this.itemList = <Array> response;
});
It looks like this… I have a service that fetches the data and returns a promise.