M
M
mortyy2017-04-13 15:17:15
JavaScript
mortyy, 2017-04-13 15:17:15

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);
    }
  }

There are cases when this data needs to be overwritten, but re-resolve does not change anything. How to proceed ?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question