Skip to content

Instantly share code, notes, and snippets.

@alexspeller
Created October 17, 2016 19:03
Show Gist options
  • Save alexspeller/3f140c4ce30647361cb0ee1a951786f6 to your computer and use it in GitHub Desktop.
Save alexspeller/3f140c4ce30647361cb0ee1a951786f6 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
links: [{params: ['Index Link', 'index']}, {params: ['Foo link', 'foo', '1']}]
});
import Ember from 'ember';
import config from './config/environment';
const Router = Ember.Router.extend({
location: 'none',
rootURL: config.rootURL
});
Router.map(function() {
this.route('foo', {path: ':foo_id'});
});
export default Router;
<h1>Welcome to {{appName}}</h1>
{{#each links as |link|}}
{{link-to params=link.params}}
{{/each}}
{
"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.7.3",
"ember-data": "2.8.0",
"ember-template-compiler": "2.7.3",
"ember-testing": "2.7.3"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment