Skip to content
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

Use handlebars each method #56

Open
samhstn opened this issue Aug 18, 2017 · 0 comments
Open

Use handlebars each method #56

samhstn opened this issue Aug 18, 2017 · 0 comments
Assignees

Comments

@samhstn
Copy link

samhstn commented Aug 18, 2017

https://github.com/FAC-11/myspace/blob/master/src/views/home.hbs#L7 could have been written in a DRYer way.

Something like this:

{{#each ["5", "10", "15", "20", "25", "30"]}}
    <li><button class="distance-li__link" name="distance" value="{{this}}" onclick="window.location.href='/results/{{this}}'">{{this}}au</button></li>
{{/each}}

Or something like that. This is quite a trivial example, but making more use of these helpers in general will help your projects

@ameliejyc ameliejyc self-assigned this Aug 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants