Last active
October 29, 2016 10:06
-
-
Save blimmer/cadc5b6a3628439261c780571258c9ab to your computer and use it in GitHub Desktop.
Group-By Feature Reques
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
import Model from "ember-data/model"; | |
import attr from "ember-data/attr"; | |
import { belongsTo, hasMany } from "ember-data/relationships"; | |
export default Model.extend({ | |
name: attr('string'), | |
category: attr('string'), | |
}); |
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.Route.extend({ | |
model() { | |
return this.store.push({ | |
data: [ | |
{ | |
id: '1', | |
type: 'artist', | |
attributes: { | |
name: 'Dead Prez', | |
category: 'Hip Hop' | |
} | |
}, | |
{ | |
id: '2', | |
type: 'artist', | |
attributes: { | |
name: 'Philip Glass', | |
category: 'Classical' | |
} | |
}, | |
{ | |
id: '3', | |
type: 'artist', | |
attributes: { | |
name: 'Claude DeBussy', | |
category: 'Classical' | |
} | |
}, | |
// Uncommenting this breaks group-by | |
//{ | |
// id: '4', | |
// type: 'artist', | |
// attributes: { | |
// name: 'The Flaming Lips' | |
// } | |
//} | |
] | |
}); | |
} | |
}); |
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
{ | |
"version": "0.10.4", | |
"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.6.0", | |
"ember-data": "2.6.0", | |
"ember-template-compiler": "2.6.0" | |
}, | |
"addons": { | |
"ember-composable-helpers": "1.1.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment