gpt4 book ai didi

javascript - Angular 返回 $$state 对象 - Angular 和 Kinvey

转载 作者:行者123 更新时间:2023-11-28 06:45:57 25 4
gpt4 key购买 nike

我有以下功能:

 $scope.save = function() {       
var promise = Kinvey.DataStore.get('books','5631713ddc168ca90f0202b6');
console.log(promise);

这是控制台日志:

d {$$state: Object}
$$state: Object
pending: undefined
processScheduled: false
status: 1
value: Object
_acl: Object
_id: "5631713ddc168ca90f0202b6"
_kmd: Object
password: "teste"
teste: "teste"
username: "testeasdf"
__proto__: Object

如何获取“密码”、“teste”和“用户名”值?

最佳答案

试试这个:

Kinvey.DataStore.get('books', '5631713ddc168ca90f0202b6', function (response) {
console.log(response.password)
});

或者:

var promise = Kinvey.DataStore.get('books','5631713ddc168ca90f0202b6');
promise.then(function(response) {
console.log(response.password)
});

关于javascript - Angular 返回 $$state 对象 - Angular 和 Kinvey,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33419718/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com