new btnGroupComponent_($parse)
Provides two directives: ngeo-btn-group and ngeo-btn.
The ngeo-btn-group directive allows creating "toggle" groups. It works with the ngeo-btn directive.
Example:
<div ngeo-btn-group>
<button ngeo-btn class="btn" ng-model="ctrl.drawPoint.active"></button>
<button ngeo-btn class="btn" ng-model="ctrl.drawLine.active"></button>
</div>
In that example the ngeo-btn are combined together in a "toggle group", where activating a button will deactivate the others.
One can use ng-model
directive at the group level in order to know if
a button is active.
Example:
<div ngeo-btn-group ngeo-btn-group-active="ctrl.drawToolActive">
See our live example: ../examples/interactionbtngroup.html
HTML attributes:
Name | Type | Description |
---|---|---|
ngeo-btn-group-active |
* | Any property of the scope. Tells whether at least one button of the group is active. |
Returns:
angular.Directive
The directive specs.