eu81273 / angular.treeview

AngularJS based Treeview (no jQuery)
MIT License
405 stars 223 forks source link

how to make a node to be selected by default #42

Open swathi1029 opened 9 years ago

swathi1029 commented 9 years ago

I had requirement of making a root node tobe made selected by default. I was unable to get the root node from the treeview. Can anybody please help me out.

swathi1029 commented 9 years ago

Is there any way to do that. Please let me know.

haches commented 9 years ago

This question is already discussed in issue #33

Amenel commented 8 years ago

I believe the discussion in issue #33 still does not provide a satisfying answer: I guess that, like some other Angular widgets, this directive will be used to reflect existing data and not just for data entry. Suppose a selection (in the tree) had been made by the user, say two days before, then the application is started and the form is loaded again and pre-filled with the data persisted two days before. How does one configure the directive so that a node (different from the root) is selected? This is exactly the problem that we are facing on the project that I'm working on. Aside from touching the directive's code (which #33 hints to), I don't see a solution.