AngularUI sortable does not work for more then one applications

独自空忆成欢 提交于 2019-12-12 20:23:41

问题


I have created angularjs application with sortable list. My application can be included to the page few times with other different applications. (Each of this angular applications is isolated user control)

var myapp = angular.module('myapp', ['ui']);
myapp.controller('controller', function ($scope) {
    $scope.list1 = ["1", "2", "3"];
});

angular.bootstrap($("#app1"), ['myapp']);
angular.bootstrap($("#app2"), ['myapp']);

http://jsfiddle.net/X2h8W/

For this case ui-sortable works only for last application in a page. This code: angular.bootstrap(document, ['myapp']); fixes problem, but I want have few isolated application on a page.

Is this angular-ui bug? Is this some configuration for angular ui?

来源:https://stackoverflow.com/questions/15486976/angularui-sortable-does-not-work-for-more-then-one-applications

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!