Skip to content

Instantly share code, notes, and snippets.

@mrinterweb
Created July 31, 2016 16:24
Show Gist options
  • Save mrinterweb/977d37fe87abdfa7a02bc099e239d3e3 to your computer and use it in GitHub Desktop.
Save mrinterweb/977d37fe87abdfa7a02bc099e239d3e3 to your computer and use it in GitHub Desktop.
wildcard-route-test
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('foo', { path: 'foo/*something/:foo_id' }, function() {
this.route('bar', { path: 'bar/:bar_id'}, function() {
this.route('baz');
});
});
});
export default Router;
import Ember from 'ember';
export default Ember.Route.extend({
model: function() {
return 'baz';
}
});
import Ember from 'ember';
export default Ember.Route.extend({
model: function() {
return 'bar';
}
});
import Ember from 'ember';
export default Ember.Route.extend({
model: function() {
return 'foo';
}
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{#link-to 'foo.bar.baz' 'flerbal' 1 2}}questionable link{{/link-to}}
{{outlet}}
<br>
<br>
{
"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.7.0",
"ember-data": "2.7.0",
"ember-template-compiler": "2.7.0"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment