@uaza wrote:
Opening an ionic modal with "$ionicModal.fromTemplateUrl" is much slower when opened for the first time than opened for subsequent times.
A potential workaround to speed up the first time opening is to preload the modal in the calling controller, e.g.
function preloadModal(templateUrl) { $ionicModal.fromTemplateUrl(templateUrl).then(function (modal) { console.log('IonicModalService: Preloaded template: ' + templateUrl); modal.show(); modal.hide(); modal.remove(); }); }
This works. However, this does not seem to be the best way to do it, therefore, does anyone know any better way to accomplish this?
Posts: 1
Participants: 1