Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

Improve the click responsiveness for modals

$
0
0

@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

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>