0
I’m trying to display the json of a search in my app,.
here is in the app displaying on the console, but wanted to display in the app my html code
<ion-header>
<ion-navbar>
<button ion-button menuToggle>
<ion-icon name="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>
code of ts
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();
}
}