Model not change if toggle-switch nested under "ng-if" element
Closed this issue · 4 comments
hellowin commented
I try
<div class="col-md-3" ng-if="true">
<toggle-switch model="someModel" html="true" class="switch-danger"
on-label='<i class="fa fa-trash-o"></i>'
off-label='<i class="fa fa-trash"></i>'>
<toggle-switch>
</div>
And someModel not updated if toggle switched.
JumpLink commented
fixed
h6784rfg6 commented
Sorry to say, but it does't still work properly: model doesn't get updated
<div class="row row-no-margin padding-bottom-5">
<toggle-switch ng-model="disableAdvertising" class="switch-les" html="true" on-label="{{'YES' | translate}}" off-label="{{'NO' | translate}}"></toggle-switch>
<span> Disable advertising</span>
</div>
<div ng-if="!disableAdvertising" class="row row-no-margin padding-bottom-5">
<toggle-switch ng-model="defaultContent" class="switch-les" html="true" on-label="{{'YES' | translate}}" off-label="{{'NO' | translate}}"></toggle-switch>
<span> Use default advertising content</span>
</div>
<span ng-if="!defaultContent">123</span>
Are there any angularJS or Bootstrap version restrictions?
lfallo1 commented
Unfortunately, same issue still occurring here as well. Not the end of the world, as ng-show works fine for what I need.