Skip to content

Commit

Permalink
Added Tree building via scope
Browse files Browse the repository at this point in the history
  • Loading branch information
arvindr21 committed Aug 31, 2014
1 parent e82c802 commit e8ee452
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
17 changes: 14 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
{
"name": "jsTree-directive",
"version": "0.1.0",
"version": "0.1.1",
"authors": [
"Arvind Ravulavaru <[email protected]>"
],
"description": "An Angular Directive for jsTree",
"keywords": "Angular, Directive, jsTree",
"keywords": [
"Angular",
"Directive",
"jsTree"
],
"main": "jsTree.directive.js",
"license": "MIT",
"homepage": "https://github.com/arvindr21/jsTree-directive",
"ignore": [
"**/.*"
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"moduleType": [
"node"
]
}
9 changes: 8 additions & 1 deletion jsTree.directive.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* jstree.directive [http://www.jstree.com]
* https://github.com/arvindr21/jsTree-directive
* http://arvindr21.github.io/jsTree-Angular-Directive
*
* Copyright (c) 2014 Arvind Ravulavaru
* Licensed under the MIT license.
Expand Down Expand Up @@ -98,6 +98,13 @@ ngJSTree.directive('jsTree', function($http) {
};
treeDir.init(s, e, a, config);
});
} else if (a.treeData == 'scope') {
config = {
'core': {
'data': s[a.treeModel]
}
};
treeDir.init(s, e, a, config);
} else if (a.treeAjax) {
config = {
'core': {
Expand Down

0 comments on commit e8ee452

Please sign in to comment.