Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uncaught TypeError: Cannot call method 'connectOutlet' of undefined

Tags:

ember.js

I'm getting an undefined parent View for my loading route handler -- but only when a specific page is navigated to first in my application.

http://www.sentinel21.com/#/posts

If you visit the about page first or the root, the loading handler seems to load properly. I'm not sure what I'm doing to cause the loading route to render improperly in that case.

Here's the loading route.

App.LoadingRoute = Ember.Route.extend({
    renderTemplate: function(){
        this.render('loading', {
            outlet: "loading",
            into: "application"
        });
    }
});

My application template has this code.

<div class="content">
    <div class="column row"></div>
  {{outlet "loading"}}
  {{outlet}}
</div>

All the code is available on github, and that's probably the easiest place to see the templates, which are precompiled.

like image 909
sentinel21 Avatar asked Oct 25 '13 19:10

sentinel21


1 Answers

I had this same problem, and it was because my app template was named "app.handlebars" but should have been called "application.handlebars". Once I changed it, the outlet was found and everything worked as expected.

like image 69
nont Avatar answered Oct 03 '22 13:10

nont