fix(modal): error message for modal show after remove

This commit is contained in:
Max Lynch
2014-05-22 14:01:54 -05:00
parent c340951b48
commit 003659b65e

View File

@@ -102,6 +102,14 @@ function($rootScope, $document, $compile, $timeout, $ionicPlatform, $ionicTempla
*/
show: function() {
var self = this;
if(self.scope.$$destroyed) {
console.error('Cannot call modal.show() after remove(). Please create a new modal instance using $ionicModal.');
return;
}
console.log(self.scope);
var modalEl = jqLite(self.modalEl);
self.el.classList.remove('hide');