Skip to content

Commit e8ee452

Browse files
committed
Added Tree building via scope
1 parent e82c802 commit e8ee452

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

bower.json

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
11
{
22
"name": "jsTree-directive",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"authors": [
55
"Arvind Ravulavaru <[email protected]>"
66
],
77
"description": "An Angular Directive for jsTree",
8-
"keywords": "Angular, Directive, jsTree",
8+
"keywords": [
9+
"Angular",
10+
"Directive",
11+
"jsTree"
12+
],
913
"main": "jsTree.directive.js",
1014
"license": "MIT",
1115
"homepage": "https://github.com/arvindr21/jsTree-directive",
1216
"ignore": [
13-
"**/.*"
17+
"**/.*",
18+
"node_modules",
19+
"bower_components",
20+
"test",
21+
"tests"
22+
],
23+
"moduleType": [
24+
"node"
1425
]
1526
}

jsTree.directive.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* jstree.directive [http://www.jstree.com]
3-
* https://github.com/arvindr21/jsTree-directive
3+
* http://arvindr21.github.io/jsTree-Angular-Directive
44
*
55
* Copyright (c) 2014 Arvind Ravulavaru
66
* Licensed under the MIT license.
@@ -98,6 +98,13 @@ ngJSTree.directive('jsTree', function($http) {
9898
};
9999
treeDir.init(s, e, a, config);
100100
});
101+
} else if (a.treeData == 'scope') {
102+
config = {
103+
'core': {
104+
'data': s[a.treeModel]
105+
}
106+
};
107+
treeDir.init(s, e, a, config);
101108
} else if (a.treeAjax) {
102109
config = {
103110
'core': {

0 commit comments

Comments
 (0)