Theory Challenge! Using Firebase to update app content?

I’ve an idea that should work in theory. It works with jQuery Mobile, LocalStorage and OpenShift. JSON is retrieved from the OpenShift server and is stored in LocalStorage. The content in the app is updated from LocalStorage with jQM.

Easy.

I’m over jQM now and OpenShift is… too obfuscated and I no longer with to use it.

So - Ionic, getting JSON from Firebase and storing it in LocalStorage. This should work.

The question is - how do I update the Ionic app with the JSON?

You see - in the jQM app I could update the structure of the app by creating new HTML with JavaScript/jQM loops that search the JSON for new content and structure. E.g. by creating new <li><a></a></li> items for new buttons.

Now in Ionic you have to build things in a slightly different, more static way.

Does anyone have any tips for how to replicate what I did with jQM?

nothing is static :wink: if you understand how angular processes html -> you could create a service, that compiles your content for you. And a directive that is a placeholder for every content you have.

read about $compile in angularjs docs.

I will do! Thanks! If that’s the case it’s game on.

There is also ionic Depoy http://docs.ionic.io/docs/deploy-overview and cordova plugins like : https://github.com/nordnet/cordova-hot-code-push. They should give you some ideas. I could see it being achievable with a few changes to the way updates are retrieved.