Hello
I need help because I can not find the solution
I created the php script to convert my sql database to json and I would like after having recuperated my data in my page, automatically create with my json data file
I want it because I create a list of sub category and I would like it to show me the sub categories in this form.
Can you show the code you have tried, or be more specific.
Are you looking for the html code to show the data or the typescript code to get your json data?
import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
import { HomePage } from '../home/home'
import { RedditData } from '../../providers/reddit-data'
/*
Generated class for the Souscat page.
See http://ionicframework.com/docs/v2/components/#navigation for more info on
Ionic pages and navigation.
*/
@Component({
selector: 'page-souscat',
templateUrl: 'souscat.html'
})
export class SouscatPage {
constructor(public navCtrl: NavController, public navParams: NavParams , public redditService: RedditData) {
}
ionViewDidLoad() {
this.redditService.getRemoteData();
/*console.log('ionViewDidLoad SouscatPage');*/
}
}
reddit-data.ts
import { Injectable } from ‘@angular/core’;
import { Http } from ‘@angular/http’;
import ‘rxjs/add/operator/map’;