In ionic v1 it was possible to load modules dynamically from a remote apache server. We didn’t have to install the modules’ sources with the application, we could store them (controller js, html, resource files etc) on an apache server folder and we downloaded them dynamically when we needed them.
In this way, we could install a very simple application to the mobile devices, which could request the side menu item list from an applications server with a service call and download the needed modules at start-up. The service call response defined the menu item name, the needed resource files and the template URL etc… The needed resource files were loaded with oc.lazyLoad and the templates were added using templateProvider:
"state":{
url: '/newsList',
cache: false,
views: {
'menuContent': {
controller: 'NewsCtrl',
templateProvider: function($http, $templateCache) {
var templateName = 'http://…/news/templates/news_list.html';
var tpl = $templateCache.get(templateName);
if(tpl){
return tpl;
}
return $http
.get(templateName)
.then(function(response){
tpl = response.data
$templateCache.put(templateName, tpl);
return tpl;
});
}
}
}
}
Is it possible to implement similar solution in ionic v2?