Skip to content

Latest commit

 

History

History
29 lines (26 loc) · 925 Bytes

README.md

File metadata and controls

29 lines (26 loc) · 925 Bytes

BGSingleSelector

Travis CI Status codecov.io

Simple single selector implements by AngularJS

Usage

<!--
value attribute is the value of the option and label attribute is the laleb to show when the option is selected,
the value of the attribute will parse as the property of the item
-->
<bg-single-selector ng-model="data.value">
    <bg-option ng-repeat="item in options" value="value" label="name"></bg-option>
</bg-single-selector>

And in javascript

$scope.options = [{
    value: 1,
    name: 'one'
}, {
    value: 2,
    name: 'two'
}, {
    value: 3,
    name: 'three'
}];