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

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -