Answer the question
In order to leave comments, you need to log in
How to get to the object?
In the console I see the following
Promise {$$state: Object, then: function, catch: function, finally: function}
Answer the question
In order to leave comments, you need to log in
Just like inside any other, just through a dot - two dollar signs in the name of the parameter should not confuse you.
var deferred = $q.defer(); // допустим, вы получаете промис из $q (а может быть из $http или $resource, я не знаю)
console.log(deferred.promise); // возвратит объект, и там будет ваш $$state
console.log(deferred.promise.$$state); // возвратит то, что внутри $$state
console.log(deferred.promise.$$state.status); // возвратит status
it seems to me that what you want to do (and what is it by the way?) needs to be done differently
If there is such a need - 100% you are doing something wrong.
Not even, not 100, but 200%.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question