0

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

ozhanli
  • 1,456
  • 18
  • 25

1 Answers1

0

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
});
probablykabari
  • 1,354
  • 10
  • 14
  • Could you explain a bit methods like isShown, show() please? Maybe an example will be better, thanks. – ozhanli Jun 11 '15 at 18:57
  • They are the methods on the instance. Look at the documentation here: http://ionicframework.com/docs/api/service/$ionicModal/ – probablykabari Jun 11 '15 at 21:25