alexsosnovskiy

Bug with Meteor-flow-router-title

Sep 3rd, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
  2.  
  3. const test = new ReactiveVar(1);
  4.  
  5. Meteor.setInterval(() => {
  6.   test.set(test.get() + 1);
  7.   console.log(`new:${test.get()}`);
  8. }, 1000);
  9.  
  10. FlowRouter.route('*', {
  11.   name: 'Test.name',
  12.   action() {
  13.     console.log('rendered');
  14.   },
  15.   title() {
  16.     const t = test.get();
  17.  
  18.     console.log(`change title:${t}`);
  19.  
  20.     return `count ${t}`;
  21.   },
  22. });
Advertisement
Add Comment
Please, Sign In to add comment