2
當加載到Ember的初始化流程的相同頁面中的prototype.js被破壞,並且內部Ember對象(應用程序,視圖等)未定義時。在https://github.com/eishay/starter-kit無法在prototype.js頁面中運行Ember.js
Uncaught TypeError: Object #<Object> has no method 'each'
collect prototype.js:864
init Mixinember-0.9.5.js:5927
Mixin.create ember-0.9.5.js:6175
get ember-0.9.5.js:6394
(anonymous function)
隨着ember.min 見樣本項目:
Enumerable.collect() at prototype.js:485
n() at ember-0.9.5.min.js:10
b.create() at ember-0.9.5.min.js:10
(anonymous function)() at ember-0.9.5.min.js:10
(anonymous function)() at ember-0.9.5.min.js:10
編輯: 剛纔看到一個線程討論它在https://github.com/emberjs/ember.js/issues/453沒有解決
謝謝,但我將我的JavaScript應用嵌入到我無法控制的託管頁面中。當我用array.prototype解決了這個問題時,其他人也出現了。我想我將無法使用餘燼。 https://github.com/emberjs/ember.js/issues/453#issuecomment-4111293 – 2012-02-22 18:01:25
Ember有一個禁用的原型開關,它可以使用javascript內建對象(數組,字符串,函數)或庫修改這些:http://emberjs.com/guides/configuring-ember/disabling-prototype-extensions/ – Szabi 2013-04-06 20:21:00
@ Jar.Jar.beans,你現在是我的英雄。 – Beez 2013-11-15 21:39:09