As shown in the picture, my list and modification are bound to vm.itemObj. If I process it when the pop-up window comes out, it will not be submitted to the backend, because Two-way binding will also change the list. How to solve this
天蓬老师2017-05-15 17:10:13
Use obj=angular.copy(vm.itemObj) to process the modification in the pop-up window controller. When returning the page controller, re-assign obj to the page controller
高洛峰2017-05-15 17:10:13
One binds vm.itemObj and one binds vm.itemObjCache.
When the modification is confirmed, the value of vm.itemObjCache['xxx'] is overwritten to vm.itemObj['xxx']
迷茫2017-05-15 17:10:13
Using different controllers for pop-ups and lists will avoid this situation.