Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- getUsers():Observable<any>{
- return this.http.get('https://jsonplaceholder.typicode.com/posts').map((datos) => datos.json());
- }
- respuesta = [];
- ionViewDidLoad() {
- this.platform.ready().then(() => {
- this.apiServiceProvider.getUsers().subscribe((res) =>{
- this.respuesta.push(res);
- console.log(res);
- });
- <ion-card *ngIf="!respuesta">
- <ul id="todo-list">
- <li *ngFor="let item of respuesta" >
- {{ item.body }}
- </li>
- </ul>
- </ion-card>
Add Comment
Please, Sign In to add comment