-
Notifications
You must be signed in to change notification settings - Fork 124
Allow empty labels, move state CSS class to outer div. #54
base: master
Are you sure you want to change the base?
Conversation
I'd suggest bumping major version if you merge this, due to the CSS change. |
Ah, did you want me to remove the "Update build" commit from this PR? |
Yeah don't have the build commit. I do that on a release on github. That way the built js is what is stable. |
if (!attrs.onLabel) { attrs.onLabel = toggleSwitchConfig.onLabel; } | ||
if (!attrs.offLabel) { attrs.offLabel = toggleSwitchConfig.offLabel; } | ||
if (!attrs.knobLabel) { attrs.knobLabel = toggleSwitchConfig.knobLabel; } | ||
if (angular.isUndefined(attrs.onLabel)) { attrs.onLabel = toggleSwitchConfig.onLabel; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a specific reason you switched these? If I remember correctly, there is a reason we do this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes; because it was impossible to specify an empty label via a directive attribute.
foo = '';
!foo; // true
angular.isUndefined(foo); // false
You can try the new tests for empty labels on master and watch 'em fail.
(Will re-push without the 'Update build' commit tomorrow) |
Re-pushed without the Update build commit. |
Is this merge worthy? Anything I can do to clean it up? |
@cgarvis how do these changes look?