Angular4 + Ionic. Model not updating in production build

Hi,

I am working on an application using Angular 4.0.2 and Ionic 3.6.1 and we have run into an issue with our production builds.

When we are building the project in development mode using: ionic cordova run ios
The application runs and functions fine with the delays expected from running in development mode.

But when we are using ionic cordova run ios --prod --release
The model binding functionality no longer works as expected. For transparency, I would like to add that we are using native services for our backend calls and those seem to leave the Angular2+ spec so ngZone.run is used for those model changes.

The issue happens for the initial page loaded by the app.

import { Component, OnInit, Output, EventEmitter, NgZone } from '@angular/core';
import { LoginModelInterface } from './loginModelInterface';
import { Keyboard } from '@ionic-native/keyboard';
import { LoginViewComponent} from './loginView.component';


@Component({
selector: 'loginComponent',
template: `<loginViewComponent [keyboardSettings]="keyboardSettings">`
providers: [IonDigitKeyboard, Keyboard],
inputs: ['userService', 'loginModel']


....
  preLoginSuccess(data) {
      this.buildUserInfo(data);
      this.zone.run(() => {
          this.keyboardSettings = this.parseKeyboardSettings(data);
      })
  }
}

The snippet of code above describes the scenario I have as much as possible. Basically, the LoginComponent has a child component called LoginViewComponent and that has an input. Once the pre login stage is completed the input is changed.

I know from some console.log commands that the input is changed but it is not reflected in the actual component (the keyboard doesn’t change behavior).

Right now I am just looking for tips on either debugging the issue or any help solving it from people that have encountered similar problems.

If more details are needed I will provide them.

Thank you for any help provided.

I did ask also on stackoverflow:

If you’re using ionic-native, that should not be necessary. If it truly is, I consider that an ionic-native bug. Please make every effort to eliminate all manual fooling with zones, so that we can eliminate that as a potential contributing factor to your problem.