ionicModal.fromTemplate() and ionicPopover.fromTemplate() fails


#1

I’ve been wrestling with both ionicPopover and ionicModal, and it looks as if the .fromTemplate() method doesn’t work as documented. Here’s my codepen - http://codepen.io/toychicken/pen/xbwNLW which is based on the ionic Nightly for modal.

My understanding is that you can pass a template string in, like

var template = '<p>Popover / Modal content</p>'

then use the .fromTemplate method to create the popover / modal like

$ionicPopover.fromTemplate(template, {scope:$scope}).then(doSomething);

Any help is much appreciated.


#2

OK - ignore me, I worked my issue - hadn’t noticed that the fromTemplate returns the object directly, rather than a promise…