Error: Attempted to assign to readonly property in collection-repeat directive


#1

I switched my dynamic list from ng-repeat to collection-repeat as per the example. I get a scrollable area, with nothing rendered, and an error that reads:
Error: attempted to assign to readonly property

Has anyone else had this issue in using collection-repeat?


#2

not exactly with collection-repeat, i had it with a form.
my problem was i binded my sql Return Object to the form.
after coping with angular.copy it did work.

try to copy your return value and tr again.
something like this:

self.fetch = function(result) {
            var temp = angular.copy(result.rows.item(0));
            return temp;
        };

#3

I get the same error, but only when running ionic emulate ios.
Starting if from xCode to a simulator 8.0 works, also on a 7.1 device it works.
What could be the issue?


#4

Any news about this? I also started to get this error and I don´t know why what triggers it as previously it was not present.


#5

Same error with normal ng-repeat. Anyone?


#6

I have been fighting with this since morning with no solution yet, I also tried to remove the iOS platform and added again in case I messed up something but I had no luck.

This happen in the iPhone 5 iOS 8.1 simulator for me.

After reading several posts in the web, including SO and other frameworks this is present in both the simulator and real device, check here: https://github.com/emberjs/ember.js/issues/5606 . Although that is for ember I have read similar reports on angular applications.

It is not the same time I read about removing the “use strict” mode on the angular files. I haven´t tried yet.

Also check here at this bug report: http://trackjs.com/blog/tracked-attempted-assign-readonly-property-ios-8-typeerror/

I will try to apply some of the above changes in order to see if that solve the problem and do not welcome other problems on board.

Please let us know any update about this matter.


Data-binding error: Attempted to assign readonly property error
#7

For the interested ones in this matter, I found a solution (at least temporal) for this error:

Check @HAKASHUN answer in this angular issue:

I substituted the “new” function he rewrote in the ionic.bundle.js file.

I tested in the iPhone 5 and 4 simulator with iOS 8.1 and the error went away and all other stuff seems to keep working correctly. I had no real devices for those models so I can´t confirm if the error also go away with this fix.

Hope this help and if you find another solution please let me know.


#8

How to implement this solution using Ionic 2? I have the same issue with Safari and iOS in an Ionic 2 App