Angular module for jQuery nestable plugin
npm install ng-nestableangular-nestable 0.0.1 
=================
###DEMO:
check out the demo here
###DESCRIPTION:
angular-nestable is a module for AngularJS that uses the jQuery nestable plugin to create multi-sortable lists with the ability to nest items within each other.
###INSTALLATION
Either run bower install ng-nestable or download angular-nestable.js form the repository directly.
Include the module in your app dependency:
``javascript
`
angular.module('yourAppModule', ['ng-nestable']);
`
Note that this module requires jQuery and jQuery nestable plugin.
###USAGE:
html
`
{{$item}}
items
Example object structure:
`
javascript
`
[
{
item: {}, // this object will be referenced as the $item on scope
children: []
},
{
item: {},
children: [
{
item: {},
children: []
}
]
},
{
item: {},
children: []
}
]
ng-repeat
Each nestable element in the DOM gets it's own non-isolated scope just like with .
ng-nestable
Also the options object can be passed to the directive as the attribute. Those options will be passed to the jQuery nestable function when creating a nestable.
$nestableProvider
===
The module also exposes a that can be injected into a config block. It provides two methods:
$nestableProvider.modelName(str)
* - can be used to set the model name variable inside each nestable element. The default value of model name is $item.
$nestableProvider.defaultOptions(obj)
* - can be used to set some default options for the nestable jquery plugin. Those options include the following: (extract from the jQuery nestable readme)
ng-sortable
maxDepth : number of levels an item can be nested (default 5)
group : group ID to allow dragging between lists (default 0)
listNodeName : The HTML element to create for lists (default 'ol')
itemNodeName : The HTML element to create for list items (default 'li')
rootClass : The class of the root element .nestable() was used on (default 'dd')
listClass : The class of all list elements (default 'dd-list')
itemClass : The class of all list item elements (default 'dd-item')
dragClass : The class applied to the list element that is being dragged (default 'dd-dragel')
handleClass : The class of the content element inside each list item (default 'dd-handle')
collapsedClass : The class applied to lists that have been collapsed (default 'dd-collapsed')
placeClass : The class of the placeholder element (default 'dd-placeholder')
emptyClass : The class used for empty list placeholder elements (default 'dd-empty')
expandBtnHTML : The HTML text used to generate a list item expand button (default '')
collapseBtnHTML : The HTML text used to generate a list item collapse button (default '')
===
Also note that the directive uses ngModelController to read and write to the provided model object and is fully compliant with $formatters and $parsers`.