can-stache-route-helpers
Adds routeUrl and routeCurrent helpers to stache.
undefined
The can-stache-route-helpers module doesn't export anything; It mixes in the following can-stache helpers that use can-route:
{{routeUrl(hashes)}} Use the
routeUrlhelper like:<a href='{{routeUrl(page="recipe" id=5)}}'>{{recipe.name}}</a>This produces (with no pretty routing rules):
<a href='#!&page=recipe&id=5'>{{recipe.name}}</a>{{#routeCurrent(hash)}} Use the
routeCurrenthelper like:<li {{#routeCurrent(page="recipe" id=5)}}class='active'{{/routeCurrent}}> <a href='{{routeUrl(page="recipe" id=5)}}'>{{recipe.name}}</a> </li>With default routes and a url like
#!&page=recipe&id=5, this produces:<li class='active'> <a href='#!&page=recipe&id=5'>{{recipe.name}}</a> </li>