Created
July 7, 2017 02:23
-
-
Save JohnBaek/d2de244c56eaea7657d18371e41d1ab9 to your computer and use it in GitHub Desktop.
//켄도 treeview 형식으로 파싱 * 재귀호출
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//켄도 treeview 형식으로 파싱 * 재귀호출 | |
$scope.parseForKendoTreeView = function(obj){ | |
angular.forEach(obj, function (item, idx) { | |
if (item.SubTeams.length > 0) { | |
item["items"] = item.SubTeams; | |
item["isLastNode"] = false; | |
$scope.parseForKendoTreeView(item.SubTeams); | |
} else { | |
item["items"] = []; | |
item["isLastNode"] = true; | |
} | |
},true); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment