mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(modal): error message for modal show after remove
This commit is contained in:
8
js/angular/service/modal.js
vendored
8
js/angular/service/modal.js
vendored
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user