FlowRouter Extra
Carefully extended flow-router package. This package implies arillo:flow-router-helpers
and zimme:active-route
packages in its core, for more details check "helpers" wiki section.
Features:
- 📦 Not dependent on Blaze, ready for React.js and other templating/components engines/libs;
- 📦 No
underscore
package dependency; - 👨🔬 Great tests coverage;
- 🥑 Up-to-date dependencies;
- 📦 Support of Fast Render and other great packages;
- 📋 Following semver with regular releases;
- 📋 Great wiki;
- 📋 Great quick start tutorial.
Install
meteor add ostrio:flow-router-extra
ES6 Import
1import { FlowRouter } from 'meteor/ostrio:flow-router-extra'; 2// Full list of available classes and instances: 3// { FlowRouter, Router, Route, Group, Triggers, BlazeRenderer, RouterHelpers }
Usage
1import { FlowRouter } from 'meteor/ostrio:flow-router-extra'; 2 3FlowRouter.route('/', { 4 name: 'index', 5 action() { 6 // Render a template using Blaze 7 this.render('templateName'); 8 9 // Can be used with BlazeLayout, 10 // and ReactLayout for React-based apps 11 } 12}); 13 14// Create 404 route (catch-all) 15FlowRouter.route('*', { 16 action() { 17 // Show 404 error page using Blaze 18 this.render('notFound'); 19 20 // Can be used with BlazeLayout, 21 // and ReactLayout for React-based apps 22 } 23});
Documentation
- Continue with our wiki;
- Quick start tutorial;
- All docs as single document.
Related packages:
- ostrio:flow-router-title - Reactive page title (
document.title
) - ostrio:flow-router-meta - Per route
meta
tags,script
andlink
(CSS), set per-route stylesheets and scripts - staringatlights:fast-render - Fast Render can improve the initial load time of your app, giving you 2-10 times faster initial page loads.
fast-render
integration tutorial - flean:flow-router-autoscroll - Autoscroll for Flow Router
- mealsunite:flow-routing-extra - Add-on for User Accounts
- nxcong:flow-routing - Add-on for User Accounts (alternative)
- forwarder:autoform-wizard-flow-router-extra - Flow Router bindings for AutoForm Wizard
- nicolaslopezj:router-layer - Helps package authors to support multiple routers
- krishaamer:flow-router-breadcrumb - Easy way to add a breadcrumb with enough flexibility to your project (
flow-router-extra
edition) - nicolaslopezj:router-layer - Easily scope CSS by automatically adding the current template and layout names as classes on the body element
Running Tests
- Clone this package
- In Terminal (Console) go to directory where package is cloned
- Then run:
Meteor/Tinytest
# Default meteor test-packages ./ # With custom port meteor test-packages ./ --port 8888 # With local MongoDB and custom port MONGO_URL="mongodb://127.0.0.1:27017/flow-router-tests" meteor test-packages ./ --port 8888
Support this project:
- Sponsor via GitHub
- Support via PayPal — support my open source contributions once or on regular basis
- Use ostr.io — Monitoring, Analytics, WebSec, Web-CRON and Pre-rendering for a website