This file contains hidden or 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({ | |
shouldRenderComponent: false, | |
actions: { | |
renderComponent() { | |
this.toggleProperty('shouldRenderComponent'); | |
}, | |
}, |
This file contains hidden or 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({ | |
shouldRenderComponent: false, | |
actions: { | |
renderComponent() { | |
this.toggleProperty('shouldRenderComponent'); | |
}, | |
}, |
This file contains hidden or 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 hidden or 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({ | |
classNames: ['bob'], | |
click() { | |
alert('You clicked me'); | |
}, | |
}); |
This file contains hidden or 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', | |
one: Ember.computed(function() { | |
console.log('get one'); | |
return true; | |
}), | |
two: Ember.computed(function() { | |
console.log('get two'); |
This file contains hidden or 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', | |
bob: Ember.computed(() => ['hello','cam','love','from','bob']), | |
}); |
This file contains hidden or 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', | |
accordion: Ember.inject.service(), | |
actions: { | |
expandAll() { | |
let accordion = this.get('accordion'); | |
console.log('accordion', accordion); | |
console.log('expand all'); |
This file contains hidden or 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({ | |
configuration: undefined, | |
actions: { | |
onExpand(item) { | |
item.toggleProperty('isExpanded'); | |
}, | |
}, | |
}); |
This file contains hidden or 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', | |
name: 'Bob', | |
volatileComputedProperty: Ember.computed(function() { | |
return `Hi ${this.get('name')}`; | |
}).volatile(), | |
dependentThing: Ember.computed('volatileComputedProperty', function() { | |
console.log('!!!'); |
This file contains hidden or 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
// Script to report the services in an ember app as requested on: | |
// https://github.com/emberjs/ember.js/issues/16134 | |
function findEmberApplication() { | |
let found = findMetaTag('name', /environment$/); | |
if (!found) { | |
throw new Error(`Couldn't find config`); | |
} | |
let config = JSON.parse(unescape(found.getAttribute('content'))); | |
let appName = config.modulePrefix; |