AnularJS $resource の取得値のresolveについて $resourceJSON $resource $resource$primiseresolve myApp.factory('prop', function($resource) { return { getSetting: function(key) { var res = $resource('setting.json').query(); return res.key; } } }); * * * key myApp.factory('prop', function($resource) { return { getSetting: function(key) { return $resource('setting.json').query().$promise.then(function(res) { return res[key]; } } } });
queryres.$promise.thenJSON
AngularJSngResource
xcX3v84RxoQ-4GxG32940ukFUIEgYdPy
56c27530010afa473e8727c9cdd08564
Stop