- Notifications
You must be signed in to change notification settings - Fork47
SortableJS/angular-legacy-sortablejs
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Angular 1 module that integrates with Sortable.js
npm install angular-legacy-sortablejs-maintainedyarn add angular-legacy-sortablejs-maintainedDon't install the old angular-legacy-sortablejs package as thats not maintained
angular.module('exampleApp',['ng-sortable']).component('dragAndDropExample',{template:`<ul ng-sortable> <li ng-repeat="item in ['burgers', 'chips', 'hotdog']"> {$ item $} </li> </ul>`,})
You can pass a Config obj tong-sortable and it will pass this onto the created sortable object. The available options can be foundhere
angular.module('exampleApp',['ng-sortable']).component('dragAndDropExample',{template:` <ul ng-sortable=$ctrl.sortableConf> <li ng-repeat="item in ['burgers', 'chips', 'hotdog']"> {$ item $} </li> </ul>`,controller:classExampleController{constructor(){this.sortableConf={animation:350,chosenClass:'sortable-chosen',handle:'.grab-handle',forceFallback:true,};}},});
Example showing how use the handle option
angular.module('exampleApp',['ng-sortable']).component('dragAndDropExample',{template:` <ul ng-sortable=$ctrl.sortableConf> <li ng-repeat="item in ['burgers', 'chips', 'hotdog']" draggable="false"> <span>Drag Header</span> <div>{$ item $}</div> </li> </ul>`,controller:classExampleController{constructor(){this.sortableConf={animation:350,chosenClass:'sortable-chosen',handle:'.grab-handle',forceFallback:true,};}},});
There are selenium based tests that can be used to check for regressions
- node
- yarn
Navigate to the repo directory in a terminal and run
yarnTo run the e2e tests run each of these commands in a separate terminal window
npm run serve:example
npm run webdriver
npm run test:e2e
About
AngularJS (legacy) directive for SortableJS.
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors6
Uh oh!
There was an error while loading.Please reload this page.