Angular Directive for the Simple TreePicker jQuery plugin. Demo is here.
- Add references to simple tree picker and the directive
<link rel="stylesheet" href="css/jquery.simple-tree-picker.css" />
<script src="js/jquery/jquery.js"></script>
<script src="js/angular/angular.js"></script>
<script src="js/jquery.simple-treepicker.js"></script>
<script src="js/angular-simple-treepicker.js"></script>- Add a dependency to the
treepickermodule in your application.
angular.module('MyApp', ['treepicker']);- Add a
treepickerattribute to your<div>tag - Add
ng-modelattribute for data-binding your model - Add
ng-treeattribute for data-binding your tree object
<div treepicker ng-model="myLocations" ng-tree="myTree" class="tree"></div>