Andrew Lewman2017-12-08 16:49:36
Andrew Lewman, 2017-12-08 16:49:36

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:
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: [/*объекты*/]

The browser hangs tightly.
Here is a working example:

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question