I get data via http. I want to pass data to PlacesListPage. My data has "id, name, category, ...". I want to use the thesis in PlacesListPage as follows: {{xxx.id}}, {{xxx.name}} ... Please help me ... xxx - for example)
import {Page, NavController, NavParams} from 'ionic-angular';
import {Http} from 'angular2/http';
import 'rxjs/Rx';
import {PlacesListPage} from '../places-list/places-list';
@Page({
templateUrl: 'build/pages/places/places.html',
})
export class PlacesPage {
static get parameters() {
return [[NavController], [Http], [NavParams]];
}
constructor(nav, http, navParams) {
this.nav = nav;
this.http = http.get('https://api.myjson.com/bins/2ud24').map(res => res.json()).subscribe(
(data) => {
this.data = data;
});
}
source
share