How to create and populate pages from local app storage

So i want to build an app using ionic which is relatively simple. The complex part is that i need to generate and populate the pages from an external api connected to an online CMS.

The theory is that that app will store the page data locally and sync with the online CMS to request new content. When the app lauches ill check the remote api to see if there is new content. if so ill update my local data, if not the local data remians the same. Then either way ill read the local data, create the pages and their content and then once thats all done take the user to the homepage of the app.

Has anyone found a good way to allow not just the page content but the pages themselves to be generated after app launch?