Emberjs - Uncaught TypeError:

时间:2015-06-30 02:27:22

标签: javascript ruby-on-rails ember.js handlebars.js

js和把手代码:http://plnkr.co/edit/37tQANhEOGli5h0fTzZc?p=catalogue

在使用ruby on rails构建的论坛网站上,使用emberjs和把手创建民意调查。我是全新的,所以我需要帮助。点击编辑并保存后,轮询会更新除最小/最大参数之外的所有内容。所以我在编辑并点击更新后检查了元素和控制台:

Uncaught TypeError: Cannot read property 'insertBefore' of null
我正在检查:

<div class="cooked">
        <div><div id="ember3782" class="ember-view poll" data-poll-type="multiple" data-poll-name="poll" data-poll-status="open"><div>
<div class="poll-container" style="height: 235px;">
    <ul>
        <li id="ember3801" class="ember-view" data-poll-option-id="5b8ee5ba2a43e258f93dbef9264bf1ad" data-poll-selected="false">Option A</li>
        <li id="ember3803" class="ember-view" data-poll-option-id="6872645f5d8ef2311883617a3a7d381b" data-poll-selected="false">Option B</li>
        <li id="ember3805" class="ember-view" data-poll-option-id="f87018a545c87172dc094ab5f6266f45" data-poll-selected="false">Option C</li>
        <li id="ember3807" class="ember-view" data-poll-option-id="953d2e70ca3da6b3e0467bd902209b35" data-poll-selected="false">Option D</li>
        <li id="ember3809" class="ember-view" data-poll-option-id="d74ff774286f3a4334ace31c8c08d28e" data-poll-selected="false">Option E</li>
    </ul>
</div>
<div class="poll-info">
  <p>
    <span class="info-number">0</span>
    <span class="info-text">voters</span>
  </p>
      <p>You may choose up to <strong>5</strong> options.</p>
      </div>
     </div>
<div class="poll-buttons">
  <button id="ember3814" class="ember-view cast-votes btn" disabled="" title="Cast your votes">Vote now!</button>

  <button id="ember3816" class="ember-view toggle-results btn" disabled="" title="Display the poll results"><i class="fa fa-eye"></i> Show results</button>

所以发生了一些事情并且它已经解决了这个错误并且不会更新。在进行一些研究后,ngrepeat和其他人有问题吗?我是ember和rails的新手,但我会很快理解。我需要帮助。

0 个答案:

没有答案