tannerlinsley / nz-toggle

Dual and triple-state toggles for AngularJS
http://codepen.io/anon/pen/yNjyME
40 stars 29 forks source link

Centralized configuration #15

Open skal111 opened 9 years ago

skal111 commented 9 years ago

Hi,

Thx a lot for the nzToggle library which I intensively use.

Since I have many nzToggle elements in my application it would be great if I could define a default configuration for my toggles as they all share the same color and size properties.

Could be something like this

angular.module('myModule', [nzToggle]).config([ 'nzToggleConfigProvider', function(nzToggleConfigProvider)) { nzToggleConfigProvider.setTrueColor('#123456'); nzToggleConfigProvider.setWidth('20'); ... ... }