Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 715 Bytes

wait.md

File metadata and controls

21 lines (16 loc) · 715 Bytes

wait method

FlowRouter.wait();
  • Returns {void}

By default, FlowRouter initializes the routing process in a Meteor.startup() callback. This works for most of the applications. But, some applications have custom initializations and FlowRouter needs to initialize after that.

So, that's where FlowRouter.wait() comes to save you. You need to call it directly inside your JavaScript file. After that, whenever your app is ready call FlowRouter.initialize().

Example

FlowRouter.wait();
WhenEverYourAppIsReady(() => {
  FlowRouter.initialize();
});

Further reading