Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. // Store
  2. this.widgetsStore.setActive(activeId);
  3. this.widgetsStore.setActive({ prev: true }); // Set the prev entity as active
  4. this.widgetsStore.setActive({ next: true } ); // Set the next entity as active
  5. this.widgetsStore.updateActive(active => {
  6. return {
  7. config: {
  8. ...active.config,
  9. date
  10. }
  11. }
  12. });
  13.  
  14. // Query
  15. this.active$ = this.widgetsQuery.selectActive();
  16. this.active$ = this.widgetsQuery.selectActive(active => active.title);
  17. this.activeId$ = this.widgetsQuery.selectActiveId();
  18.  
  19. this.active = this.widgetsQuery.getActive();
  20. this.activeId = this.widgetsQuery.getActiveId();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement