Skip to content

Instantly share code, notes, and snippets.

@dustinfarris
Created December 29, 2016 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dustinfarris/807383f0c58810bcf2f2bb7bd269d22e to your computer and use it in GitHub Desktop.
Save dustinfarris/807383f0c58810bcf2f2bb7bd269d22e to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
import Ember from 'ember';
import config from './config/environment';
const Router = Ember.Router.extend({
location: 'none',
rootURL: config.rootURL
});
Router.map(function() {
this.route('thing', { path: '/things/:thing_id' }, function() {
this.route('extras');
});
});
export default Router;
import Ember from 'ember';
export default Ember.Route.extend({
model(params) {
return params.thing_id;
}
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{liquid-outlet}}
<br>
<br>
{{link-to "Thing 1" "thing" 1}}
{{link-to "Extras" "thing.extras" model}}
{{link-to "Index" "index"}}
{
"version": "0.10.7",
"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.0",
"ember-data": "2.10.0",
"ember-template-compiler": "2.10.0",
"ember-testing": "2.10.0"
},
"addons": {
"liquid-fire": "0.27.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment