1
我下面就如何使這裏的認證路徑的例子:https://gist.github.com/machty/5647589Ember.js 1.0rc6 - RSVP沒有定義
然而,當我運行此代碼:
App.AuthenticatedRoute = Ember.Route.extend({
beforeModel: function(transition) {
if (!authTokenPresent) {
return RSVP.reject();
}
}
}
我得到:
Uncaught ReferenceError: RSVP is not defined
我是很新,這整個事情的承諾,所以我認爲這是一些剛烤成燼拒絕的承諾。我應該在這裏做一些不同的事情嗎?