How to use ionicModal Methods?

654 views Asked by At

Is there anybody can explain that how to use ionicModal methods like initialize(options), isShown() described on doc.

1

There are 1 answers

2
probablykabari On BEST ANSWER

The initialize method is the constructor used internally. That bit is basically showing you the methods you can pass here to the fromTemplate and fromTemplateUrl methods on the $iconicModal service.

The other methods like isShown are to be used on the instance of the modal.

$ionicModal.fromTemplateUrl('my-modal.html', { <- this hash goes to initialize
  scope: $scope,  
  animation: 'slide-in-up'
}).then(function(modal) {
 $scope.modal = modal; <- this is the instance to call "isShown"/etc on
});