Dynamically load data to one page? (SOLVED)


#1

I will try to make this brief. I am newb with ionic and coding in general. I have an idea for an app for my personal use. Here is an example of what I want to tackle:

Say I want to make an app that catalogs flowers. I was going to use an SQLite database to store information about each plant locally.

Can someone point me in the right direction of how to dynamically (i think is correct term) load info from database onto a page? Just some reading material, I do not mind figuring it out for myself. I just can’t find help for this kind of question unless I misread in my findings.

I basically want one page to display whatever plant info is queried or requested.


#2

reed about navigation in ionic2
http://ionicframework.com/docs/v2/getting-started/navigating/

so you would have a page for a flower list and a detail page.

You open the detail page with a navparameter like:

  this.navCtrl.push(DetailPage, { id: 1 });

In the detail page you can use something like that:
You can access the params:

And then fire your db-query with your id :wink:


#3

Awesome man, thank you, just what I needed!