Skip to content

Instantly share code, notes, and snippets.

@Juraci
Created September 28, 2016 00:52
Show Gist options
  • Select an option

  • Save Juraci/55b8bf2d54243453d983c9f4217be238 to your computer and use it in GitHub Desktop.

Select an option

Save Juraci/55b8bf2d54243453d983c9f4217be238 to your computer and use it in GitHub Desktop.
Route
import Ember from 'ember';
import config from './config/environment';
const Router = Ember.Router.extend({
location: 'none',
rootURL: config.rootURL
});
Router.map(function() {
this.route('games');
});
export default Router;
import Ember from 'ember';
export default Ember.Route.extend({
model() {
return [
{ name: 'Dota 2'},
{ name: 'Hearthstone'}
];
}
});
<ul>
{{#each model as |game|}}
<li>{{game.name}}</li>
{{/each}}
</ul>
{
"version": "0.10.5",
"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.8.0",
"ember-data": "2.8.0",
"ember-template-compiler": "2.8.0",
"ember-testing": "2.8.0"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment