javascript - Angular - no method sortable - Stack Overflow

I am including all necessary scripts (The error was in order of the scripts + missing jQuery):<scrip

I am including all necessary scripts (The error was in order of the scripts + missing jQuery):

<script src="scripts/vendor/angular/angular.js"></script>
<script src="ponents/angular-bootstrap/ui-bootstrap-tpls.js"></script>
<script src="ponents/angular-ui/build/angular-ui.js"></script>

And using this code snippet:

<div ng:controller="controller">
    <ul ui:sortable ng:model="list">
        <li ng:repeat="item in list" class="item">{{item}}</li>
    </ul>
    <hr />
    <div ng:repeat="item in list">{{item}}</div>
</div>

But I keep getting this error:

TypeError: Object [object Object] has no method 'sortable'

Anybody ever experienced the same and knows the way out?

I am including all necessary scripts (The error was in order of the scripts + missing jQuery):

<script src="scripts/vendor/angular/angular.js"></script>
<script src="ponents/angular-bootstrap/ui-bootstrap-tpls.js"></script>
<script src="ponents/angular-ui/build/angular-ui.js"></script>

And using this code snippet:

<div ng:controller="controller">
    <ul ui:sortable ng:model="list">
        <li ng:repeat="item in list" class="item">{{item}}</li>
    </ul>
    <hr />
    <div ng:repeat="item in list">{{item}}</div>
</div>

But I keep getting this error:

TypeError: Object [object Object] has no method 'sortable'

Anybody ever experienced the same and knows the way out?

Share Improve this question edited Mar 28, 2013 at 16:54 Michal asked Mar 28, 2013 at 16:29 MichalMichal 15.7k10 gold badges77 silver badges105 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 11

You are missing jquery-ui library. angular-ui make use of jquery-ui library to provide sortable functionality.

angular-ui library depends on jquery-ui library, so download and add the jquery-ui.css and jquery-ui.js to the project.

Also jquery-ui needs jquery library, so if you have not included it, download an include it also.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744764152a4592353.html

相关推荐

  • javascript - Angular - no method sortable - Stack Overflow

    I am including all necessary scripts (The error was in order of the scripts + missing jQuery):<scrip

    17小时前
    30

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信