Open vitalibr opened 7 years ago
I was struggling with the same issue. The solution was simple: do not use this directive. Instead use: https://github.com/JumpLink/angular-toggle-switch (especially check out it's is-disabled atribute, which will work when ngModel has changed. Alternative solution does not have this feature: https://github.com/frapontillo/angular-bootstrap-switch/issues/96)
nice @majkelo !
Look my PR :) simple and solved the issue
https://github.com/akveo/blur-admin/pull/187/commits/1c8bb71c55d227fb92428a90d3c6119e8a7f39b1
@vitalibr nice, I have already used it(your pr),and solved the problem
The directive Switch creates the bootstrap switch once the page is loaded.
But if you try to change the switch ngModel after loading the DOM, the button state (on or off) is not changed. (E.g. Loading server data).
It is necessary to load the plugin again? like this: