Skip to content

Latest commit

 

History

History
133 lines (112 loc) · 9.4 KB

README.md

File metadata and controls

133 lines (112 loc) · 9.4 KB

Flow-Router Extra Docs Index

Client routing for Meteor.js apps

meteor add ostrio:flow-router-extra
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';

// DISABLE QUERY STRING COMPATIBILITY
// WITH OLDER FlowRouter AND Meteor RELEASES
FlowRouter.decodeQueryParamsOnce = true;

FlowRouter.route('/', {
  name: 'index',
  action() {
    // Render a template using Blaze
    this.render('templateName');

    // Can be used with BlazeLayout,
    // and ReactLayout for React-based apps
  }
});

// Create 404 route (catch-all)
FlowRouter.route('*', {
  action() {
    // Show 404 error page using Blaze
    this.render('notFound');

    // Can be used with BlazeLayout,
    // and ReactLayout for React-based apps
  }
});

Important

For the new apps it is recommended to set decodeQueryParamsOnce to true. This flag is here to fix #78. By default it is false due to its historical origin for compatibility purposes

General tutorials:

Hooks (in execution order):

Helpers:

API:

Related packages:

Support this project: