Jyo
Jyo

Reputation: 3

show Ionic Popup automatically without any button click in ANgularJS

I have an ionic popup which works fine on ng-click. But how do I make it appear automatically when my start page appears?

I know I need to write code in $scope.init(). However, I am new to ionic. Can anyone help me? Thanks!

Upvotes: 0

Views: 531

Answers (1)

Priya
Priya

Reputation: 126

Use the following code,

 $scope.$on('$ionicView.enter', function(e) {
    callpopup();
 })

This $ionicView.enter will execute, whenever you are opening the your view.Refer:http://ionicframework.com/docs/api/directive/ionView/

Upvotes: 0

Related Questions