Skip to content

Instantly share code, notes, and snippets.

@unkleara
Last active December 20, 2015 10:49
Show Gist options
  • Save unkleara/6119082 to your computer and use it in GitHub Desktop.
Save unkleara/6119082 to your computer and use it in GitHub Desktop.
Making collection of angular.js input types to reference.
<select ng-model='param' required ng-options='option.value as option.name for option in scope'>
<option></option>
</select>
<input ng-model="param" placeholder="">
<button ng-click="yourFunction(params)"></button>
Bootstrap dropdown toggle prevent default event on checkbox input
<li class="dropdown" ng-controller="DropdownCtrl">
<a class="dropdown-toggle">
Dropdown preventDefault click with checkbox
</a>
<ul class="dropdown-menu">
<li><input type="checkbox" ng-click="$event.stopPropagation()"></li>
<li><input type="checkbox" ng-click="$event.stopPropagation()"></li>
<li ng-repeat="choice in items">
<a>{{choice}}</a>
</li>
</ul>
</li>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment