I use service like this :
province(){
return this.$http({
method : "POST",
url : "http://192.168.1.38:3000/provinces/_search"
});
};
and in controller get data like this :
comboInit(){
/*Province*/
this.initInfo.province().then(
/*success*/ (result) => {
console.log(result);
this.province=result.data;
},
/*error*/(err) => {
console.log(err);
}
);
}
but I want call province() method like this
this.province=this.initInfo.province()
I want this.initInfo.province()
method without .then() or success() in controller