List.Js does not work

Asked

Viewed 51 times

0

I am creating a web app using EMBER and want to use in a certain place the Listjs to list discussions but not working. follows the code:

   function(List){
        var options = {
          listClass: 'list',
          valueNames: [ 'discussion' ]
          };

          var discussionList = new List('matheus', options);
            });
      });

<script type="text/x-handlebars" id="discussions">
    <div class="large-4 columns forum-discussions" id="matheus">
        <!-- Menu de funcionalidades -->

        <div class="row">
            <div class="larger-2 columns text-center">
                <!-- Search -->
                <a href="#" class="button round option" id="search"><i class="fa fa-search"></i></a>

                <!-- New discussion -->
                {{#link-to 'discussions.new' classNames="button round option"}}
                    <i class="fa fa-plus"></i>
                {{/link-to}}
            </div>

            <!-- toggle effect begin-->

            <!--search-->
            <div class="forum-search forum-events">
                <input type="text" class="search"  value="" placeholder="Buscar Discussão">
            </div>

            <!-- end of toggle effect-->

            <hr class="forum-divisor">
        </div>
        <!-- Listagem de discussões -->
        <div class="row">
            <div class="large-12 forum-discussions-list">
                <ul class="list">
                    {{#each discussion in model}}
                        {{#link-to 'discussion' discussion}}
                        <li>
                            <div class="larger-4 forum-photo">
                            <!--photo-->
                            </div>
                            <div>
                                <p class="discussion">{{discussion.title}}</p>
                            </div>
                        </li>
                        {{/link-to}}

                        <hr class="forum-divisor">
                    {{/each}}
                </ul>
            </div>
        </div>
    </div>
    {{outlet}}
    </script>
  • 1

    http://answall.com/help/mcve

  • Part of the beginning of javascript is missing. Complete the snippet to help us help you.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.