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
var rsvp = require('rsvp'); | |
class TestPromiseFromNative extends Promise { | |
then(onFulfillment, ...args) { | |
return super.then(result => isolate(onFulfillment, result), ...args); | |
} | |
} | |
class TestPromiseFromRSVP extends rsvp.Promise { | |
then(onFulfillment, ...args) { |
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'; | |
const { run } = Ember; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
func1() { | |
let log = function() { | |
console.log('boom!'); |
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
export function showInViewPort($el, tolarance, cb) { | |
if (!$el || !$el[0]) { return cb && cb(); } | |
tolarance = tolarance || 0; | |
var $body = $(document.body); | |
var topScrollAmount = $body.scrollTop(); | |
var viewPortHeight = $(window).height(); | |
var elY = $el.offset().top; | |
var elBottomY = elY + $el.height(); | |
var topBounds = topScrollAmount + tolarance; |
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'; | |
const rates = { | |
'usd-gbp': 0.6666 | |
} | |
const formatters = { | |
gbp(val){ | |
return (Math.ceil(val / 5) * 5).toLocaleString(); | |
} |
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
{ | |
"animation_enabled": false, | |
"auto_complete_commit_on_tab": true, | |
"auto_complete_triggers": | |
[ | |
{ | |
"characters": "<", | |
"selector": "text.html" | |
}, | |
{ |
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 default Ember.Controller.extend({ | |
hideHomeButtonRoutes: ['index', 'login'], | |
isHomeButtonVisible: Ember.computed('currentRouteName', function(){ | |
return this.get('hideHomeButtonRoutes').indexOf(this.get('currentRouteName')) === -1; | |
}) | |
}); |
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 default Ember.Controller.extend({ | |
inputVal: 'hello', | |
actions: { | |
inputChange(val) { | |
this.set('inputVal', val); | |
} | |
} | |
}); |
NewerOlder