md-switch doesn't have an option to align text
Right now the md-switch component only allows to have the text on the right side of the switch control

It will be nice to have the ability to set the text on the left size of the switch control

+1
I think this is a very needed feature.
Since the switches are typically to the right of the text, the option to configure the text placement is required for this control. We have implemented this in several places and really need this to be a standard config.
+1
I'd be really useful to have that option
@DevVersion I would like to submit a pull request for this issue. What is needed to put a PR together?
@Lordnoname Awesome, looking forward to see it.
I think, we should add an attribute, which will be observed and can be interpolated.
<md-switch md-invert="isInverted"></md-switch> // Interpolated
<md-switch md-invert></md-switch> // True
<md-switch md-invert="false"></md-switch> // False
So, the postLink observes the attribute and applies changes correctly.
// On Init and on Attribute Value Change
$attrs.$observe('mdInvert', function(newValue) {
isInverted = $mdUtil.parseAttributeBoolean(newValue);
// Update Elements with CSS or JS
// Think JS is better, to support RTL as well
// Add a class to invert the margin / padding as well.
element.toggleClass('_md-invert', isInverted);
});
// The CSS need to invert the margin or padding of the switch component.
&._md-invert {
@include rtl-prop(padding-right, padding-left, PADDING);
}
If you have any further questions, let me know.
+1 This would really help.
This issue is closed as part of our ‘Surge Focus on Material 2' efforts. For details, see our forum posting @ http://bit.ly/1UhZyWs.