Skip to content

Instantly share code, notes, and snippets.

@JohnBaek
Created July 7, 2017 02:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JohnBaek/d2de244c56eaea7657d18371e41d1ab9 to your computer and use it in GitHub Desktop.
Save JohnBaek/d2de244c56eaea7657d18371e41d1ab9 to your computer and use it in GitHub Desktop.
//켄도 treeview 형식으로 파싱 * 재귀호출
//켄도 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