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

6 comments:

  1. Come and read us!! We are moving our blog into a new site with a much more pretentious goal. We are going to teach how to be AngularJS Ninjas!!! That's right! We have taken a couple of weeks to prepare our first workshop, absolutely free!!!!


    AngularJS Certification Training in Chennai

    ReplyDelete
  2. Great post!I am actually getting ready to across this information, I am very happy to this commands.Also great blog here with all of the valuable information you have.Well done, it's a great knowledge.
    Software Testing Training in Chennai | Software Testing Training in Chennai with Placement

    ReplyDelete