Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

Modal.show on app.run

$
0
0

Just put the modal in the controller like this

> .controller('authentication', function($scope, $ionicModal){

>     console.log("I am now in the authentication mode...")

>     // Create the login modal that we will use later
>   $ionicModal.fromTemplateUrl('templates/login.html', {
>     scope: $scope
>   }).then(function(modal) {
>     $scope.modal = modal;
>   });

>   // Triggered in the login modal to close it
>   $scope.closeLogin = function() {
>     $scope.modal.hide();
>   };

>   // Open the login modal
>   $scope.login = function() {
>     $scope.modal.show();
>   };
> })

Viewing all articles
Browse latest Browse all 228595

Trending Articles