angularjs - Vertical alignment of label followed by md-switch in angular material -
i have page in want display text in label
followed md-switch
. i'm aware of fact can remove label , display text after switch, solution not acceptable.
<md-content layout="row"> <label class="md-title">text</label> <md-switch class="md-primary" ng-true-value="'yes'" ng-false-value="'no'" ng-model="vm.data"> {{vm.data}}</md-switch> </md-content>
i cannot seem align these elements vertically. switch lower text, not under label, after lower. suggestions appreciated.
you can add layout-align="start center" attribute or replace "start" "center" or "end" if want other alignment:
<md-content layout="row" layout-align="start center"> <label class="md-title">text</label> <md-switch class="md-primary" ng-true-value="'yes'" ng-false-value="'no'" ng-model="vm.data"> {{vm.data}}</md-switch> </md-content>
Comments
Post a Comment