caitp / angular-semantic

AngularJS directives for Semantic-UI
413 stars 47 forks source link

This method works nice for radio and checkbox without angular-semantic lib #27

Closed bluishoul closed 2 years ago

bluishoul commented 10 years ago
    <div class="grouped inline fields">
        <div class="field">
            <div class="ui radio checkbox">
                <input type="radio" name="type" value="1" ng-model="project.type" ng-change="" id="type1">
                <label for="type1">公有</label>
            </div>
            <div class="ui radio checkbox">
                <input type="radio" name="type" value="2" ng-model="project.type" id="type2">
                <label for="type2">私有</label>
            </div>
        </div>
        <div class="ui checkbox">
            <input type="checkbox" ng-model="project.gitEnabled" id="gitEnabled">
            <label for="gitEnabled">启用Git版本控制?</label>
        </div>
    </div>

just add 'id' attribute for input and 'for' for label