I'm trying to display json from a search in my app, but I do not know how to do that.
hereisintheappdisplayingintheconsole,butwantedtodisplayintheapp myhtmlcode
<ion-header><ion-navbar><buttonion-buttonmenuToggle><ion-iconname="menu"></ion-icon>
</button>
<ion-title>
Agenda
</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding id="page10">
<form (ngSubmit)="logForm()">
<ion-list>
<ion-item>
<ion-input type="text" [(ngModel)]="cpf" name="cpf"> </ion-input>
</ion-item>
</ion-list>
<div ng-repeat="pesquisar"></div>
<div>
<button ion-button type="submit">Pesquisar</button>
</div>
</form>
</ion-content>
ts code
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { BuscarProvider } from '../../providers/buscar/buscar';
@Component({
selector: 'page-agenda',
templateUrl: 'agenda.html'
})
export class AgendaPage {
user: any;
cpf: any;
constructor(
public navCtrl: NavController,
private buscarProvider: BuscarProvider
) {
}
logForm() {
this.buscarProvider.buscar(this.cpf)
.then(
(result: any) => {
for (var i = 0; i < result.success.length; i++) {
var user = result.success[i];
this.user.push(user);
}
}
)
.catch();
}
}