--prod strange behaviour with ng-reflect - cli 3.13.2

I am facing a very strange behavior with building with --prod, I am using the latest Ionic cli 3.13.2

I appreciate if anyone can tell me how to solve the problem or change my code to achieve the desired outcome in the last code block below.

I have a list of checkboxes

    <ion-item *ngFor="let user of people.items">
      <ion-checkbox [value]="user.id"></ion-checkbox>

When I run/build with --debug or even with --prod --livereload, the code comes out correctly as below

<ion-checkbox class="checkbox checkbox-md" tappable="" ng-reflect-value="1">
  <div class="checkbox-icon">
    <div class="checkbox-inner"></div>

When I run/build with --prod only, the ng-reflect-value=“1” in the ion-checkbox tag (first line) disappears! and comes out as follows

<ion-checkbox class="checkbox checkbox-md" tappable="">
  <div class="checkbox-icon">
    <div class="checkbox-inner"></div>

The real problem is that I use this value later on to get the ids of the checked boxes as below

let checkedBoxes = this.el.nativeElement.querySelectorAll('.checkbox-checked');
    if (checkedBoxes.length > 0) {
      [].forEach.call(checkedBoxes, function(box) {

What is your ionic info output?

cli packages: (/home/oem/.nvm/versions/node/v6.9.5/lib/node_modules)

@ionic/cli-utils  : 1.13.1
ionic (Ionic CLI) : 3.13.2

global packages:

cordova (Cordova CLI) : 6.5.0 

local packages:

@ionic/app-scripts : 1.1.4
Cordova Platforms  : android 6.1.2 ios 4.3.1
Ionic Framework    : ionic-angular 2.2.0


Android SDK Tools : 26.1.1
Node              : v6.9.5
npm               : 2.15.12 
OS                : Linux 4.10


backend : pro

Just to clarify, upgrading to ionic-angular 3 introduced a huge number of UI changes/problems, I had to go back to 2.2.0 for now.

No reason not to upgrade these - these are relevant for the build process.

I am afraid they would introduce unforeseen problems like the one in this very post. I finally got the App into a stable state after a few months of struggling. I am also not 100% sure this would actually solve the problem. Is there any way around this without this upgrade? I want to ship this release out and then deal with all the upgrades to come to the latest version.

No idea, but I am not willing to debug broken code. That’s why new versions are released, to fix known bugs and problems.
You will have to find someone else to help you.

I totally understand. Is there maybe any other way to achieve the desired? Different html code, different ts code?