Modal not working with platform.ready


#1

I am trying to get a modal to pop up when my app loads.

The modal works fine on click but when I try to get it to pop up automatically using;

$ionicPlatform.ready(function () {
      $scope.openModal();
  });

It doesn’t do anything. I just get a blank page.

What am I doing wrong? Or is there a better solution to having modals pop up on load?


#2

What $scope do you use? may be you must use $rootScope


#3

$rootScope didn’t solve the issue.

I couldn’t figure it out. I used a popup instead and it worked fine.

Not really sure what was wrong.


#4

Can you share some code, I don’t know what $scope do you call.