1
votes

Edit(current jsbin http://jsbin.com/univer/17/edit ) see comments

Output:: http://jsbin.com/univer/3/

Code:: http://jsbin.com/univer/3/edit

I'm not using the ID for the url, I'm using a slug I pass in. I don't know if that has anything to do with the issue but I can navigate directly to the nested route.

If you go here jsbin.com/univer/3#/projects/ , everything works as intended. However, if you try to go here jsbin.com/univer/3#/projects/project-1, the page is blank.

Using the rest adapter, I have the projects view rendering with the same code but the model never get's set on the project view. When you navigate directly to the page, the view renders but all you see is "This is the model:" without the name.

Any help is greatly appreciated. If needed, I can make my API public to test on the REST adapter itself but thought the fixture adapter should work the same.

Brett

1
Made a little progress. You'll notice in teh App.ProjectRoute, if you hard code the model id, it works fine. So the issue seems to be with the App.Project.find not returning a model jsbin.com/univer/22BrettAHale

1 Answers

0
votes

First issue is with the setupController method for App.ProjectRoute. It is missing the controller, model arguments.

App.ProjectRoute = Ember.Route.extend({
  setupConroller:function(controller, model){
  controller.set('model',model);
},

Next issue is that the FixtureAdapter does not support findQuery out-of-box. If you're planning to use RestAdapter instead this might not be important, but if you want to make things work in jsBin using FixtureAdapter will need to reopen DS.FixtureAdapter and add a custom queryFixtures method. Advice on how to do that can be found here: https://stackoverflow.com/a/18165887/983357