ng-change not firing on input type of Checkbox in Portal

Jason Williams
Kilo Sage

Hi All,

I'm using a checkbox in a table row within a Service Portal widget and pre-checking depending on a value within each record, so some are checked initially.

I'm then using ng-change to do something when the checkbox is checked/unchecked.

For some reason, the change event does not fire when unchecking a box that was pre-checked when the widget renders initially. It fires as expected in all other cases, i.e. if the box was not checked and then I check it.

Has anyone seen this behaviour or are you able to see what I'm doing wrong?

Below is my HTML for the checkbox:

<input type="checkbox" id="checkBox" ng-model="checkModel" ng-change="check(child.sys_id,checkModel)" ng-checked="child.active" class="pull-right">

Many Thanks,

Jason

1 ACCEPTED SOLUTION

Jagadeesh1
Kilo Guru

Hello Jason,

   Can you try the same with ng-click?

Thanks,

Jagadeesh

View solution in original post

3 REPLIES 3

Allen Andreas
Administrator
Administrator

Hello,

Can you please also share the client script which would execute once the change has been made?

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Jagadeesh1
Kilo Guru

Hello Jason,

   Can you try the same with ng-click?

Thanks,

Jagadeesh

Thanks Jagadeesh, just tried ng-click and that works perfectly!

Much appreciated!

Jason