This serves as a base canary gist for @rwjblue.
A few useful links for the main source/gist are:
import Ember from 'ember'; | |
import { BusListenerMixin } from 'demo-app/services/bus'; | |
export default Ember.Component.extend(BusListenerMixin, { | |
classNames: ['message-listener'], | |
_setup: function() { | |
this.set('messageLog', []); | |
}.on('didInitAttrs'), |
This serves as a base canary gist for @rwjblue.
A few useful links for the main source/gist are:
This serves as a base canary gist for @rwjblue.
A few useful links for the main source/gist are:
Version 2 of the example of a simple expandable list. In this example the problem is solved in a isolated way. The controller doesn't need to know that the list is or isn't expanded, all is handle by the component.
View Twiddle | Copy Twiddle | View Gist
Original idea of this README taken from @rwjblue
Version 3 of the example of a simple expandable list. In this example the problem is solved by extending the model to allow it to content information of the view. This way, whichever is using the model will know the state of the items inside (expanded or not expanded), so the controller will be able to handle it.
View Twiddle | Copy Twiddle | View Gist
Original idea of this README taken from @rwjblue
This serves as a base canary gist for @rwjblue.
Example using ember collection in ember-twiddle.
View Twiddle | Copy Twiddle | View Gist
Original idea of this README taken from @rwjblue
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle', | |
actions:{ | |
saveMessage(message) { | |
console.log("message", message); | |
} | |
} |
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle' | |
}); |
Demo using dynamic attributeBindings
to enable auto-attribute bindings without having to know all possible combinations.
Note this is using a simplified version of {{one-way-input}}
(part of the ember-one-way-controls addon).