- Update
constructorto receive arguments directly- Implemented in this PR, just needs review and merge
- Probably could be simplified in Ember 3, we can remove multi-object
create
- Update concatenated and merged properties in RFC
- Concatenated and merged properties will not be able to work the way they used to.
- No way to know the value of a field before an instance is created
- Parent class constructor finishes before child constructor, so no way to get value in
makeCtorbase constructor
- Fix native getters/setters (make mandatory setter aware of them)
applyMixin,watchKey, anddefinePropertyerase native getters and setters
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
| /** | |
| @extends Ember.Mixin | |
| Implements common pagination management properties for controllers. | |
| */ | |
| App.PaginationSupport = Ember.Mixin.create({ | |
| hasPaginationSupport: true, | |
| total: 0, |
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
| var promises = [ | |
| Q.nfcall(db.query, args) | |
| ]; | |
| if (condition) { | |
| promises.push(Q.nfcall(db.query, args2)); | |
| } | |
| Q.all(promises).then(function() { | |
| /* yay callback */ |
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
| Ember.ObservableObjectProxy = Ember.Object.extend({ | |
| init: function() { | |
| this._super(); | |
| Ember.defineProperty(this, 'properties'); | |
| this.set('properties', {}); | |
| }, | |
| unknownProperty: function(property) { | |
| return this.get('properties.'+property); | |
| }, |
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
| Playlists | |
| Grunge Rock | |
| =========== | |
| Trophy Wife It Comes In Waves…(Neil Young) | |
| Dead Confederate The Rat | |
| Indie/Folk | |
| ========== | |
| Josh Ritter The Temptation of Adam |
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
| // verses.js - controller | |
| import Ember from 'ember'; | |
| import DS from 'ember-data'; | |
| export default Ember.ObjectController.extend({ | |
| actions: { | |
| getAnotherVerse: function() { | |
| // Here you need to understand a little bit about promises. A promise is | |
| // asynchronous, so in you need to use .then() to get the value of the | |
| // promise that is returned. |
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({ | |
| tagName: 'td' | |
| }); |
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', | |
| init() { | |
| this.set('prop', 1); | |
| this.set('computedProp', 1); | |
| }, | |
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'; | |
| let FooComponent = Ember.Component.extend({ | |
| baz: Ember.computed('foo', function() { | |
| return this.get('foo'); | |
| }), | |
| fooObserver: Ember.observer('foo', function() { | |
| this.set('qux', 'quux'); | |
| }), |
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', | |
| items: [{ name: 'foo' }, { name: 'bar' }], | |
| sorter: Ember.computed.sort('items', ['name:asc']) | |
| }); |