Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Issue With Parent Route
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('person', {
path: 'person/:id',
}, function() {
this.route('add-stuff');
});
});
export default Router;
import Ember from 'ember';
export default Ember.Route.extend({
model() {
console.log('LOADING ADD STUFF MODEL');
}
});
import Ember from 'ember';
export default Ember.Route.extend({
model(params) {
console.log('LOADING PERSON MODEL');
return {};
},
});
------------------
ADD STUFF TEMPLATE
------------------
{{#link-to "person" "53"}}
View Person
{{/link-to}}
{{outlet}}
<br>
<br>
<p>
----------------------
PEROSN ROUTE TEMPLATE
----------------------
</p>
{{#link-to "person.add-stuff" 55}}
Go To Child Route
{{/link-to}}
{
"version": "0.12.1",
"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.12.0",
"ember-template-compiler": "2.12.0",
"ember-testing": "2.12.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.