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
model(params) { | |
const stuff = this.modelFor('other.stuff'); | |
const filter = params.filter; | |
return { | |
stuff, filter, | |
}; | |
}, |
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'; | |
import { | |
validatePresence, | |
validateFormat, | |
} from 'ember-changeset-validations/validators'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
validation: { |
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({ | |
scope: 'inner', | |
actions: { | |
fromOuter(){}, | |
clicked(){ | |
console.log('clicked', this.get('scope')); | |
this.get('fromOuter')(); | |
} |
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'; | |
import Chainer from 'app/components/my-chainer' | |
export default Chainer.extend({ | |
first(){ | |
console.log('subclass first', this) | |
} | |
}); |
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
In component Chainer | |
Ember.extend.... { | |
first(){}, | |
second(){}, | |
actions: { | |
chain(){ |
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
In comp-a | |
Ember.extend(... | |
didSave(){ | |
// default implementation | |
} | |
actions: { | |
onSave() { |
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
{{#my-modal}} | |
{{my-form saveComplete=(action 'hideModal')}} | |
{{/my-modal}} |
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
owView = hsc.ui.View.create | |
contentDisplayProperties: ['description'] | |
createChildViews: (container) -> | |
container.left = 0 | |
container.right = 0 | |
container.top = 0 | |
container.bottom = 0 | |
@label = Ti.UI.createLabel |
NewerOlder