New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding routeUrl and routeCurrent #1992

Merged
merged 3 commits into from Oct 16, 2015

Conversation

Projects
None yet
2 participants
@justinbmeyer
Contributor

justinbmeyer commented Oct 16, 2015

adds a routeUrl and routeCurrent helper to stache that look like:

<pre>url={{ routeUrl(undefined,true) }}</pre>

<a  {{^ routeCurrent(page='home') }}
        href="{{ routeUrl(page='home') }}"
    {{/routeCurrent}}
    >home</a>

<a  {{^routeCurrent page='restaurants'}}
        href="{{routeUrl page='restaurants'}}"
    {{/routeCurrent}}
    >restaurants</a>

{{#eq page 'home'}}
    <h1>Home page</h1>
{{else}}
    <h1>Restaurants page</h1>
{{/eq}}

@justinbmeyer justinbmeyer added this to the 2.3.0 milestone Oct 16, 2015

daffl added a commit that referenced this pull request Oct 16, 2015

@daffl daffl merged commit 8186ce6 into minor Oct 16, 2015

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@daffl daffl deleted the route-stache-helpers branch Oct 16, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment