Hi, employer here to give a bit more background.
So I definitely get why this appears to be a bad idea, but I’d like to add the reason for the requirement and a couple of points.
I appreciate the responses which suggest some sort of builder of templates based on structural data returned from the API. However the issue that we’ll be facing is that our clients, those who will be using the app, will not be able to update the app itself that frequently. It will be in a private repo and there’s no guarantee that they’ll be using the latest version. The only updates they’ll be constantly receiving is from the API.
The API does not return pre-compiled HTML but rather dynamically generated ionic templates meant for consumption/rendering by one of the components.
The templates can be very customized and so having the app dynamically build the templates based on structural data would only work if the app was updated frequently, because the definitions of how to build the templates would be built in to the app.
Rather, we’d much prefer that the app – in it’s 1.0 state – is capable of being fed template strings right from the API because that ensures that any non-standard templates can be generated on the server via the API rather than in the app.
I had a beta working in Ionic2/Angular2 (early RC) with ng-dynamic-component using this strategy, and @casperkotwal has since updated the codebase to the latest versions, but perhaps something has changed in the code which makes this strategy no longer possible (or possibly still a bad strategy).
Thanks for all of the help!