@JobsMonika wrote:
Thanks in advance.
I am really trying to get data from my json file while the user parsing on the button but it doesn’t work… any help?
New with Ionic
Thanksmy ts
private tips: any[]; getData() { let localData = this.http.get('/assets/advices.json').map(res => res.json()); localData.subscribe(data =>{ this.tips=data; })my html
<button ion-fab (click)="getData()"> <ion-icon name="search"></ion-icon> </button> </ion-content>including the right providers
Posts: 7
Participants: 3