cgarvis / angular-toggle-switch

AngularJS Toggle Switch
http://cgarvis.github.io/angular-toggle-switch
MIT License
160 stars 124 forks source link

Setting on-label and off-label globally #71

Closed salarmehr closed 9 years ago

salarmehr commented 9 years ago

Is it possible to set on-label and off-label globally?

cgarvis commented 9 years ago

You can use the provider toggleSwitchConfig.

myApp.config(['toggleSwitchConfigProvider'], function(toggleSwitchConfigProvider) {
  toggleSwitchConfigProvider.onLabel = 'Yes';
  toggleSwitchConfigProvider.offLabel = 'No';
});
salarmehr commented 9 years ago

@cgarvis Thanks, adding this to the documentation can be really useful.