有人能让我知道如何将maxDepth选项传递给这个jquery nestable但是在angularjs版本中吗?文档说它暴露了$ nestableProvider,但我不知道如何使用它。
https://github.com/kamilkp/ng-nestable
<div class="panel-body">
<div ng-nestable ng-model="nodes">
<div class="row">
<div class="col-md-3">
<select ng-model="dDescription" class="form-control">
<option value="">- Select -</option>
</select>
</div>
<div class="col-md-2">
{{$item.text}}
</div>
</div>
</div>
</div>
控制器
$scope.nodes = [
{
item: { text: 'Item 13' },
children: []
},
{
item: { text: 'Item 14' },
children: []
},
{
item: { text: 'Item 15' },
children: [
{
item: { text: 'Item 16' },
children: []
},
{
item: { text: 'Item 17' },
children: []
},
{
item: { text: 'Item 18' },
children: []
}
]
}
];
答案 0 :(得分:0)
$ nestable.defaultOptions = {maxDepth:999};