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 badges1 Answer
Reset to default 11You 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
评论列表(0条)