Ionic RC3 Build Errror

I am getting this weird error during the build process. The error seems to reference a custom form validator I have in place. Ionic serve works just fine, but any build it fails. Any ideas?

ionic-app-scripts build

[00:44:53] ionic-app-scripts 0.0.45
[00:44:53] build prod started …
[00:44:53] clean started …
[00:44:53] clean finished in less than 1 ms
[00:44:53] copy started …
[00:44:53] ngc started …
[00:44:54] copy finished in 258 ms
[00:45:42] Error: Error at C:/Users/el_da/Documents/Projects/ebc/.tmp/pages/login/
[00:45:42] Property ‘invalidEmail’ does not exist on type ‘{ [key
[00:45:42] string]: any; }’.
[00:45:42] ngc failed
[00:45:42] ionic-app-script task: “build”
[00:45:42] Error: Error

I figured out that the error message which I had displaying based on a error needed to have brackets.

had *ngIf="username.errors?.invalidEmail needed to be *ngIf="username.errors[‘invalidEmail’]