0

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!

Jyo
  • 3
  • 3

1 Answers1

0

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/

Priya
  • 126
  • 7