I've gone over the docs and I can't see what I'm doing wrong.
Router.map
App.Router.map(function(){
this.resource('users', function(){
this.resource('user', { path: ':user_id' });
this.resource('add');
});
});
handlebar
<script type="text/x-handlebars" id="users/add">
<h3>Add User</h3>
</script>
I get the proper URL with my link-to:
{{#link-to 'add'}}Add User{{/link-to}}
However the contents of my handlebar template for users/add never show?
Here are my Routes
App.UsersRoute = Ember.Route.extend({
model: function(){
console.log("Users route triggered");
return App.Users;
}
});
App.UserRoute = Ember.Route.extend({
model: function(params){
return App.Users.findBy('id', params.user_id);
}
});
App.UserAddRoute = App.UserRoute.extend({
renderTemplate: function(){
console.log("Users Add Route triggered");
this.render('users/add');
}
});
Here's my jsbin: http://jsbin.com/denap/3/edit?html,js,output