* move window.apiPrefix into Angular service
* avoid routing by accept headers, integrate api service
* Revert "Fixed over-matching of index route."
This reverts commit 62e1225dd3.
* better name for index template file
25 lines
469 B
JavaScript
25 lines
469 B
JavaScript
'use strict';
|
|
|
|
angular.module('insight.address').factory('Address',
|
|
function($resource, Api) {
|
|
return $resource(Api.apiPrefix + '/addr/:addrStr/?noTxList=1', {
|
|
addrStr: '@addStr'
|
|
}, {
|
|
get: {
|
|
method: 'GET',
|
|
interceptor: {
|
|
response: function (res) {
|
|
return res.data;
|
|
},
|
|
responseError: function (res) {
|
|
if (res.status === 404) {
|
|
return res;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|