Friday, September 2, 2016

angular.copy() error: "destination.push is not a function"

Recentlly I got the following error:

TypeError: destination.push is not a function

Turns out I was trying to use angular.copy(source, target) where the target was an object and the source was an array.

When using angular.copy(source, dest), both types must be the same "type", either Object, or Array

No comments:

Post a Comment