[AngularJS] 發現 Angular.copy()與 assignment(=) 的差異

  • 44
  • 0

Angular.copy()與 assignment(=) 的差異

範例:http://jsbin.com/bisacelojo/edit?html,js,console,output

範例中有兩段程式碼,看語法相似,但實際執行結果又會不一樣。

看起來還必須要花點時間研究,所以先暫時把一點點結果貼在這裡,之後有機會再來研究....((繼續coding~

Reference:

官方文件:https://docs.angularjs.org/api/ng/function/angular.copy

stackoverflow:http://stackoverflow.com/questions/29749433/difference-between-angular-copy-and-assignment

-------------新手駕駛,有錯誤請指教--------------------