Activeroute rewrite published

I’ve just published 1.0.0-alpha.1 of activeroute:core, activeroute:iron-router, activeroute:flow-router and activeroute:blaze.

The packages live under a new GitHub organization meteor-activeroute.

There’s a new modular architecture which will open up for adding more view layers and routers.

However for now you’ll need to do a small bit of setup to get started. I hope to release some umbrella packages that do this setup for you later on.

To make it work as zimme:active-route you will have to do some setup in a client side file.
e.g.
<project_root>/client/activeroute.js

import { registerTemplateHelpers } from 'activeroute:blaze';
import ActiveRoute from 'meteor/activeroute:core';
import routerAdapter from 'meteor/activeroute:iron-router';

const activeRoute = new ActiveRoute({
  caseSensitive: false, // default value
  routerAdapter,
};

registerTemplateHelpers({
  activeClassName: 'active', // default value
  caseSensitive: false, // default value
  activeRoute,
  disabledClassName: 'disabled', // default value
});

Please try it out and yell at me if things don’t work or if the new api isn’t working out.

2 Likes