How to get data from {$$state: Object}?

后端 未结 3 1378
南方客
南方客 2021-01-19 08:11

I try to get data from database using factory. I have a problem, because I don\'t know how to get data from object which was returned from factory. This is what I received

3条回答
  •  无人共我
    2021-01-19 08:58

    This worked in my case: result.$$state.value.

    Sample Code: Controller:

    promise = getConfigService.getAccount(protocol+hostName+port);
        promise
        .then(
            function (result) {
    var baseUrlTemp = result.$$state.value.baseURL;
    console.log("BaseURL:"+baseURLTemp)
    }
    

    Ouput: BaseURL: www.oneindia.com

提交回复
热议问题