【问题标题】:Ember Route model issueEmber Route 模型问题
【发布时间】:2013-05-09 15:29:58
【问题描述】:

我正在学习 DockYard 上的 Brian Cadarella 的教程。 使用 Rails-api 后端构建 Ember 应用程序。 http://reefpoints.dockyard.com/ember/2013/01/09/building-an-ember-app-with-rails-api-part-2.html

一旦我改变:

App.UsersIndexRoute = Ember.Route.extend
  setupController: (controller, model) ->
    controller.set('users', model)
    @controllerFor('application').set('currentRoute', 'users')

收件人:

App.UsersIndexRoute = Ember.Route.extend
  model: ->
    App.User.find()
  setupController: (controller, model) ->
    controller.set('users', model)
    @controllerFor('application').set('currentRoute', 'users')

我的用户页面链接不起作用。我的萤火虫控制台出现以下错误:

TypeError: Ember.RSVP.reject is not a function
[Break On This Error]   
return Ember.RSVP.reject(error);

Ember.RSVP.reject 在 ember-data.js 中

为什么它不起作用?我一直在逐字学习该教程。

【问题讨论】:

  • 我的这个其他答案可能对你有帮助stackoverflow.com/questions/16368964/…我敢肯定,如果你更新你的依赖,一切都会奏效。
  • 成为 Ee Aye Utiful。现在可以使用了,谢谢。
  • 不客气,如果我的回答有用,你可以点赞:)
  • 我会把它作为答案发布,如果有用的话你可以接受它:) 谢谢!
  • 我试过了,我没有 15 个声望点来投票,但我给了你绿色的复选标记哈哈

标签: ruby-on-rails-3.2 ember.js ember-data rails-api


【解决方案1】:

我的这个其他答案可能对你有帮助EmberJS TypeError: Object #<Object> has no method 'reject'...我敢肯定,如果你更新你的依赖关系,一切都会奏效。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-02
    • 2014-06-25
    • 1970-01-01
    • 2023-04-01
    • 2015-01-12
    • 1970-01-01
    相关资源
    最近更新 更多