xpepermint / angular-ui-switch

On/off switch button for AngularJS. DEPRECATED!
278 stars 125 forks source link

Switch Text #6

Closed maiamachine closed 9 years ago

maiamachine commented 9 years ago

Added the ability to add text to the switch. The user can add optional attributes of "on" and "off" to the switch element like this:

 <switch id="enabled" name="enabled" ng-model="enabled" on="On" off="Off" class="green"></switch>

If the user does not want to use the words On/Off, they can set any other value here, such as Yes/No:

 <switch id="enabled" name="enabled" ng-model="enabled" on="Yes" off="No" class="green"></switch>

These will be added to the switch as shown in attached screenshot. An option class of "wide" has also been added to the last switch to allow it to accommodate more text. screen shot 2015-03-04 at 9 34 58 pm

xpepermint commented 9 years ago

Good, thanks. Let's wait for the feedback from others and then we merge.

sebastialonso commented 9 years ago

:+1:

I was just going to fork and implement this, and I decided to check PRs. This is a must I believe.