I'm trying to use Bootstrap-Toggle in a Angular2 project and I can't get it working.
I did some debugging and I it see properly displaying but after all the initialization occurs it goes back to a normal checkbox.
It appears the problem has to due with Bootstrap-Toggle adding elements directly to the DOM.
How can I get Bootstrap-Toggle working in Angular2?

you need to initialize it with java script like that in ngOninit() in your component relative to that template
ngOninit(){
$("#toggleId").bootstrapToggle();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With