javascript - Bootstrap Toggle Plugin - Checkboxes Not Toggling When Using Angular -
I am using the plugin to convert my checkbox to toggle switch. I am also using AngularJS when I set the checked value, it correctly toggles it. But when I do not, it does not toggle. You can see in the links to my results, these checkboxes are checked, but they are not toggle Do anyone know that it is not compulsive using the angular?
HTML:
& lt; Div class = "form-group" & gt; & Lt; Label class = "col-sm-7-control-label" & gt; & Lt; Span & gt; Task toggle & lt; / Span & gt; & Lt; / Labels & gt; & Lt; Div class = "call-sm-5" & gt; & Lt; Input id = "toggle-one" checked type = "checkbox" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "form-group" & gt; & Lt; Label class = "col-sm-7-control-label" & gt; & Lt; Span & gt; Color review check & lt; / Span & gt; & Lt; / Labels & gt; & Lt; Div class = "call-sm-5" & gt; & Lt; Input type = "checkbox" category = "pull-right" ng-model = "color review" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "form-group" & gt; & Lt; Label class = "col-sm-7-control-label" & gt; & Lt; Span & gt; Check the type review & lt; / Span & gt; & Lt; / Labels & gt; & Lt; Div class = "call-sm-5" & gt; & Lt; Input type = "checkbox" category = "pull-right" ng-model = "type review" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "form-group" & gt; & Lt; Label = color-review for "class =" col-sm-7-control-label "> gt; & lt; span & gt; color review & lt; / span & gt; & lt; / label & gt; Input style = "checkbox" id = "color-review" category = "pull-right" ng-model = "color review" & gt; & gt; & quot; color-sm-5 & quot; label = "type-review" class = "col-sm-7-control-label"> Labels = "Col-sm-5"> & lt; span & gt; Type Review & lt; / span & gt; & lt; / Labels & gt; & lt; Type = "checkbox" id = "type-review" category = "pull-da "Ng-model =" review of type "> Javascript:
< Set the code> // checkbox switches $ ('# -color-review') to toggle the BootstrapToggle (); $ Bootstrap Toggle (); Result: Here is a link from a picture o
My results:
Have you seen?
$ scope.topics: [{"true", "offLabel": "off", "onLabel": "on"}]; & Lt; Div ng-repeat = "T in topics" & gt; & Lt; Toggle-switch model = "t.switch.on" on-label = "t.switch.onLabel" off-label = "t.switch.offLabel" switch = "doSomethingToggle (t, $ index)" & gt; ; / Toggle switch & gt; & Lt; / Div & gt;
Comments
Post a Comment