How to assign object in factory - angularjs -
if assign object in factory this:
$http.get('/api/whatever').success(function(data) { result = data.obj });
it gives result new address , therefore reference controller result
broken. how assign then? value value works, seems not right way. how watch object properly?
basically factory has , set methods getting , setting value in factory object. here example. time may have use events after updating factory object others instance have updated value
Comments
Post a Comment