Skip to content

Instantly share code, notes, and snippets.

@afitterling
Created October 13, 2013 13:56
Show Gist options
  • Save afitterling/6962653 to your computer and use it in GitHub Desktop.
Save afitterling/6962653 to your computer and use it in GitHub Desktop.
<div class='btn-group' name='FIXME' ng-change='onChange' ng-model='treeItems' ng-required='true'>
<a class='btn btn-default dropdown-toggle' data-toggle='dropdown' href='#' ng-disabled='ngDisabled'>
{{currentValue.name || dropdownPlaceholder }}
<span class='caret'></span>
</a>
<ul class='dropdown-menu' ng-show='!ngDisabled'>
<li ng-repeat='model in treeItems'>
<li ng-if='model' ng-include="'node.html'"></li>
</div>
</li>
</ul>
<script id='node.html' type='text/ng-template'>
<li ng-click='selectValue(model)'>
<a>
{{model.name}}
</a>
</li>
<ul ng-repeat='model in model.children' style='margin-left: 10px;'>
<li ng-include="'node.html'"></li>
</ul>
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment