Skip to content

kwuite/flow-router

 
 

Donate Gitter GitHub issues GitHub forks GitHub stars Twitter

FlowRouter Extra

Carefully extended flow-router package.

Features:

Install

meteor add ostrio:flow-router-extra

ES6 Import

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

Use

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

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

Documentation

Related packages:

Support this project:

This project wouldn't be possible without ostr.io.

Using ostr.io you are not only protecting domain names, monitoring websites and servers, using Prerendering for better SEO of your JavaScript website, but support our Open Source activity, and great packages like this one could be available for free.

Packages

No packages published

Languages

  • JavaScript 100.0%