Answer the question
In order to leave comments, you need to log in
AngularJS tree building directive. How to pass an object to ng-repeat?
Good day, I decided to write a directive for displaying a tree, but there is not much experience in writing directives, so it was decided to turn to the search.
The solution was found right away: https://habrahabr.ru/sandbox/75566/
If you write like this:
html: ng-repeat="item in items"
js:
then everything works,
but if like this:
html:
js:$scope.items = [/*объекты*/]
ng-repeat="item in someObj.items"
$scope.someObj = {
items: [/*объекты*/]
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question