Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49083

Ionic v3 changing default startup page

$
0
0

I want to be able to load pages using my database.

Usually, when we use the pages they are used as component. But when I get the page name in the database its being treated as a string.

For example, in the app.component page we can see this line:

this.rootPage = FirstPage;

But when I load it using my database like this:

this.rootPage = data[0].value;

It shows an error. How do I load it from the database and still treat it as a component?

Currently, I am doing it in a switch statement. It works but its not clean.

Help is appreciated. Thanks!

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 49083

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>