【问题标题】:Ember JS :: Uncaught TypeError: Object App.Router has no method 'map'Ember JS :: Uncaught TypeError: Object App.Router has no method 'map'
【发布时间】:2013-01-08 00:18:09
【问题描述】:

在路由器上使用 map() 方法时出现未捕获的错误。有什么想法吗??

App.Router.map(function(match) {
        match('/').to('index');
        match('/models').to('models');
    });

错误:: Ember JS :: Uncaught TypeError: Object App.Router has no method 'map'

灰烬版本: http://cloud.github.com/downloads/emberjs/ember.js/ember-latest.js

【问题讨论】:

  • 您使用的是哪个版本的 Ember?
  • 我正在使用 ember-1.0.0-pre.2.js
  • Router.map 与新路由器有关。不在 1.0.0-pre.2 中。
  • 我明白了,知道如何获取 ember.js 的最新版本吗?在 ember 网站上找不到链接。

标签: ember.js


【解决方案1】:

在官方 github 上找到更新有点棘手。不过,您可以在此处获取它的副本:

https://github.com/sh4n3d4v15/ember-todos/blob/master/app/scripts/vendor/ember.js

【讨论】:

  • 感谢 Shane,这已经解决了问题。
  • 谢谢!这解决了我的问题。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-12-25
  • 1970-01-01
  • 1970-01-01
  • 2012-04-20
  • 2013-03-13
相关资源
最近更新 更多