Last active
February 18, 2016 23:09
-
-
Save sylwiaeb/52fb74f39b4c16225267 to your computer and use it in GitHub Desktop.
[handlebars] UI firendly index
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Returns 1,2,3,... indexes based on even index from {{#each}} loop | |
import Ember from 'ember'; | |
export function ruleNo(val) { | |
return val === 0 ? 1 : val / 2 + 1; | |
} | |
export default Ember.Helper.helper(ruleNo); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment