Is there anyway to load the view templates from a server?

Is there anyway to house the .html files with the ionic template tags on a external server so I can update them/add new ones in real time?

Currently I have html files on a server, but I can’t get them to load any other way then injecting the html with [innerHTML] or something like the sorts.

So i’d like to load the entire file from the server so I can add/remove new as I please and have the app reflect in realtime, but I want to make sure I can use ionic template tags in the files so they can feel native without having to make 100 template files in the app itself.

I’m sure this cant be that strange of a request? Any help would be appreciated.

sure this is a strange request, because you want an app fast as possible. If you need to load each template from an external service you get a lag of average 200-800ms in best cases. Your app will not work offline and you forget, that the webview has a cache like the browser.

So you will not use this cache --> the app needs to load all templates again and again from your server.

For those purposes you have the deployment service in the ionic cloud --> change your app + click deploy and all devices get those changes without republish your app in the app stores.

If you are bundling the app all styles and templates are compiled so no additional request are necessary during execution ;). The templateUrls are transformed to inline templates and so on

So the Ionic cloud is basically what I want then? Change the app on the service, and have the app bundle update automatically?

yep. You only need to implement the logic of ionic deploy like check for updates on app start, trigger download and deploy. thats it. There are other services, but would check out this first.

Hope this helps.

Yes thanks a lot ill give it a try.

Hey @Rappasoft did you give it a try? Did it work? I have a similar requirement and I would like to know if you were able to do it. Thanks.