我正在使用角度树控件来显示树中的值。现在我有一个方案,我必须在树的末尾添加一个值。这是我尝试的代码(plunkr)。我希望将ng-model值附加到Dani。该怎么做?
<body ng-app="app">
Add Value To Tree: <input type="text" ng-model="searchTree">
<div ng-controller="myController">
<treecontrol class="tree-light"
tree-model="dataForTheTree"
filter-expression="searchTree "
filter-comparator="false"
options="treeOptions"
on-selection="showSelected(node)"
selected-node="node1">
{{node.name}}{{searchTree}}
</treecontrol>
</div>
</body>