I want share data between controller, so though service, I can easily get and set data. But if a data set by a function in function in service, it's can not update controller's data. like this:
_this.testf = function (){
_this.test.push(1);
_this.test.push(1);
_this.test.push(1);
$timeout(function (){
_this.test.push(2);//this can not seen in controller
}, 1000);
}
The new data still can be update by $watch, but it's not same as reference.
Here is the example code:http://codepen.io/nsbp/pen/MwdqRq