Why aren't my templates rendering

2019-01-28 14:52发布

I've created some random views with the latest transition stuff from ember and the outlets aren't rendering. It's saying it's transitioning, but nothings showing up in the output window. (Note this works if I completely remove the routes)

Here it is:

jsfiddle to example

App.PageRoute = Em.Router.extend({
    model: function(params, transition){
        return App.Page.find(params.page_id);
    }
});

Does it have to do with promises? Am I supposed to be returning a promise instead of the actual model?

1条回答
对你真心纯属浪费
2楼-- · 2019-01-28 15:15

You're route is extending the Router! It should be,

App.PageRoute = Em.Route.extend({
    model: function(params, transition){
        return App.Page.find(params.page_id);
    }
});

Updated fiddle here.

查看更多
登录 后发表回答