lundi 29 juin 2015

Emberjs - Uncaught TypeError:

js and handlebars code: http://ift.tt/1LEQbRv

On a forum website built with ruby on rails, polls are created using emberjs and handlebars. I am totally new to this so I need help. The poll updates everything apart from min/max params after clicking edit and save. So I inspected the elements and on the console I got after editing and clicking update:

Uncaught TypeError: Cannot read property 'insertBefore' of null

html i'm inspecting:

<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>

So something going on and its got do do with this error and wont update. A problem with ngrepeat with others after doing some research? I'm totally new with ember and rails, but i'll understand quick . I need help please.




Aucun commentaire:

Enregistrer un commentaire