Answer the question
In order to leave comments, you need to log in
How to reuse resolve in Angular?
When loading the application, it fulfills the first resolution
setThreads(val) {
if (!this.threadsInited) {
this.initThreadsDefer.resolve(val.items);
this.threadsInited = true;
} else {
this.newMessageDefer.notify(val.newMessage);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question