Hi, I’m developing an app that uses pop-ups. To create them using this code:
$ionicModal.fromTemplateUrl("./templates/modal/searchArticolo.html", {
scope: $scope,
animation: 'slide-in-up'
}).then(function(modal) {
$scope.dOrd.modal = modal;
$scope.openModal();
});
$scope.openModal = function() {
$scope.dOrd.modal.show();
};
$scope.closeModal = function() {
$scope.dOrd.modal.remove();
};
The problem is that if I try to open the pop-up a second time, I get this error:
68 989391 error Error: Attempted to assign to readonly property.
ChildScope@http://192.168.1.19:8100/lib/ionic/js/ionic.bundle.js:21460:44
$new@http://192.168.1.19:8100/lib/ionic/js/ionic.bundle.js:21468:40
createModal@http://192.168.1.19:8100/lib/ionic/js/ionic.bundle.js:43940:52
http://192.168.1.19:8100/lib/ionic/js/ionic.bundle.js:44003:32
processQueue@http://192.168.1.19:8100/lib/ionic/js/ionic.bundle.js:20962:29
http://192.168.1.19:8100/lib/ionic/js/ionic.bundle.js:20978:39
$eval@http://192.168.1.19:8100/lib/ionic/js/ionic.bundle.js:22179:28
$digest@http://192.168.1.19:8100/lib/ionic/js/ionic.bundle.js:21995:36
$apply@http://192.168.1.19:8100/lib/ionic/js/ionic.bundle.js:22283:31
http://192.168.1.19:8100/lib/ionic/js/ionic.bundle.js:50863:19
eventHandler@http://192.168.1.19:8100/lib/ionic/js/ionic.bundle.js:10823:25
dispatchEvent@[native code]
triggerMouseEvent@http://192.168.1.19:8100/lib/ionic/js/ionic.bundle.js:2811:20
tapClick@http://192.168.1.19:8100/lib/ionic/js/ionic.bundle.js:2800:20
tapTouchEnd@http://192.168.1.19:8100/lib/ionic/js/ionic.bundle.js:2918:13
I saw that the line “21460: 44” file js ionic.bundle.js, is in this function:
this.$$ChildScope = function ChildScope() {
this.$$watchers = this.$$nextSibling =
this.$$childHead = this.$$childTail = null;
this.$$listeners = {};
this.$$listenerCount = {};
Can anyone help me please?
I’m stuck in this point
Thanks!
Matteo