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

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 49183

Trending Articles