I went into trouble when I tried to add filters to routes with optional parameters. Therefore I declared the names for my routes but it seems like the filter isn't checking the right name.
Maybe I'm doing something wrong?
a quick example:
Meteor.Router.add
'/':
as: 'homeTest'
to: 'home'
'/create/:step?':
as: 'create'
to: (step) ->
…
Meteor.Router.filter 'checkLoggedIn',
only: 'create'
# I have to change 'homeTest' to 'home' to run the filter on the home page
Meteor.Router.filter 'checkLoggedIn',
only: 'homeTest'
I went into trouble when I tried to add filters to routes with optional parameters. Therefore I declared the names for my routes but it seems like the filter isn't checking the right name. Maybe I'm doing something wrong?
a quick example: