Toggle track size


#1

Hi all !

I am creating a form in my app with various fields and a toggle button.
First, I used normal HTML5 to do that but then I decide to use the toggle component delivered by Ionic.
So, I reused the code from the documentation and readapt it to my needs :
<ion-toggle ng-model="myposition" toggle-class="toggle-positive">Use my position</ion-toggle>

The toggle button shows well at the exception of the size of the track.
In the html, my toggle button shows as the following:

`

Use my position
`

My problem is the toggle-small tag. In the example in the documentation (the list of toggles example), this tag is remplaced by toggle-large.
I would like to know how to change toggle-small to toggle-large knowing that I didn’t decide to use that class in my code ?
By the way, adding toggle-class="toggle-large" to the ion-toggle doesn’t work…
Thanks in advance.


#2

Hi,

Looking up at the toggle directive, there is a configuration you can set at app start with $ionicConfigProvider.form.toggle(‘large’);, so that it will come as default, maybe it is set to come as ‘small’ as default.