Last active
August 29, 2016 09:10
-
-
Save DidelotK/4c743ea0eaec4f8d55e6d3be392d8b87 to your computer and use it in GitHub Desktop.
Test helper
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.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
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 function date(params/*, hash*/) { | |
let date = params[0], | |
duration = params[1]; | |
if (date === null) { | |
return 0; | |
} | |
else if (date + duration * 60 < Date.now()) { | |
return 1; | |
} | |
return 2; | |
} | |
export default Ember.Helper.helper(date); | |
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.Route.extend({ | |
model(){ | |
return { | |
launchedat: null, | |
duration: 20 | |
}; | |
} | |
}); |
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
{ | |
"version": "0.10.4", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.6.2", | |
"ember-data": "2.7.0", | |
"ember-template-compiler": "2.6.2" | |
}, | |
"addons": { | |
"ember-truth-helpers": "1.2.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment