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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
}); |
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); |
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
prettyUrl: (url) => | |
hasProtocol = url.indexOf '://' | |
if hasProtocol > -1 | |
protocol = url.slice(0, hasProtocol + 3) | |
url = url.slice(hasProtocol + 3, url.length) | |
return { | |
protocol: protocol | |
url: url |
NewerOlder