TypeError and "Cannot call method 'connectOutlet' of undefined" in Ember.js

I'm attempting to use Ember.js for a small demo site for viewing gigapans of macroinvertebrates (e.g. [like this one](http://gigapan.com/mobile/iOS/1.0/?is-social-enabled=0&id=132000)). Each is categorized one the site by [taxonomic rank](http://en.wikipedia.org/wiki/Taxonomic_rank), in this case only order, family, and genus (since they're all of the same class and we don't have species-level identification). It's a small site, only 13 genera. Here's a simple working example with nothing but navigation: http://jsbin.com/ihapaw/10 The home page lists all three orders, and under each are the families, and then genera. Click around a bit and you'll see that I'm using dynamic segments to get an URL scheme that follows a /ORDER_ID/FAMILY_ID/GENUS_ID pattern. What I'd like to add now is a menu from which the user could choose to jump to any rank or genus. The design calls for a menu button which the user would click, a div would appear with a listing of all the orders, families, and genera, and the user could click to jump to the page they want. Populating the menu panel, making it appear onclick, and so on is not a problem. What I'm having a trouble with is that using the links in the menu end up resulting in Ember errors that I can't make any sense of. Here's an updated demo: http://jsbin.com/ihapaw/14 In that demo, pretend the blue area is the menu panel that appears after clicking a menu button. If you open the JavaScript console, and then click the "Brachycentrus" genus in the blue menu area, and then click the "Tallaperla" genus (the very last one) in the menu area, you'll see the following errors in the console: > `Error while loading route: TypeError {}` > > `Uncaught TypeError: Cannot call method 'connectOutlet' of undefined` For the repro steps above, I see also in the content area below the menu that, after clicking on the "Tallaperla" genus, the order is correctly updated to "Plecoptera", but the family and genus aren't. I imagine that's a clue to the problem, but have no clue what it means. I should maybe add that it's not just those two genera causing the problem--it's easy to repro the errors if you click around enough in the menu area. That repro example was just the easiest and fastest I could find. I'm using Ember 1.0.0-rc.6, Ember Data 0.13, and Handlebars 1.0.0-rc.4.
I've not had a chance to dig into your jsbin, but usually when I have this kind of problem it's because ember is expecting things to be named in a way I was not expecting. Setting LOG_ACTIVE_GENERATION and LOG_VIEW_LOOKUPS will give you a better sense of what's going on as you click around the app, might help you track this down. See blog.emberwatch.com/2013/06/13/… for details on these options

以上就是TypeError and "Cannot call method 'connectOutlet' of undefined" in Ember.js的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准