-
-
Save rldleblanc/cefe486379198a2423143c0dac995d0c to your computer and use it in GitHub Desktop.
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: 'ul', | |
classNames: ['column-list'], | |
sortedItems: Ember.computed.sort('items', 'sortBy'), | |
didReceiveAttrs() { | |
if (this.get('sortBy')) { | |
this.get('sortBy', [ this.get('sortBy') ]); | |
} else { | |
this.set('sortBy', []); | |
} | |
} | |
}); |
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.Route.extend({ | |
model(){ | |
return [ | |
{ | |
id: '3', | |
title: 'Main Dishes', | |
}, { | |
id: '2', | |
title: 'Cakes, Pies & Sweets', | |
}, { | |
id: '1', | |
title: 'angappie', | |
}, { | |
id: '4', | |
title: 'Dips & Sauces', | |
}, { | |
id: '5', | |
title: 'Meat Dishes', | |
}, { | |
id: '8', | |
title: 'Vegetable', | |
}, { | |
id: '6', | |
title: 'Seafood Dishes', | |
}, { | |
id: '7', | |
title: 'Bread & Cereals', | |
} | |
]; | |
} | |
}); |
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
{ | |
"version": "0.11.0", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.10.2", | |
"ember-data": "2.11.0", | |
"ember-template-compiler": "2.10.2", | |
"ember-testing": "2.10.2" | |
}, | |
"addons": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment