-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
Hi all, I've got this error when I try to build my app with --prod -aot, with ng serve everythings works fine.
ERROR in /media/1tb/Sites/solution-timing/solution-timing-admin/src/$$_gendir/app/users/user-editing/user-editing.component.ngfactory.ts (645,55): Property 'email' does not exist on type '{}'.
The ts file is like this:
export class UserEditingComponent implements OnInit {
snackBar:MdSnackBar;
usersService:UsersServices
edit_form: {};
current_user;
commonServices:CommonServices;
constructor(
private dialogRef: MdDialogRef<UserEditingComponent>,
private _snack:MdSnackBar,
private _cond:UsersServices,
private _comm:CommonServices,
) {
this.edit_form = {};
this.usersService = _cond;
this.commonServices = _comm;
this.snackBar = _snack;
this.usersService = _cond;
this.current_user = {};
this.resetErrorMsg();
}
creaNuovoUtente() {
if (this.current_user.password !== this.current_user.password_confirm) {
this.commonServices.printAlertMsg('Errore! Le due password non coincidono', 6000);
return false
}
this.current_user.crypted_password = this.current_user.password;
delete this.current_user.password;
delete this.current_user.password_confirm;
this.usersService.createNewUser(this.current_user).subscribe((result) => {
if (result.err === 100) {
this.commonServices.printAlertMsg('Errore salvataggio utente', 3000);
return false;
}
this.dialogRef.close('Utente creato con successo');
},
(error) => {
this.commonServices.printAlertMsg('Errore salvataggio nuovo utente', 3000);
});
}
I don't know why it gives me this error when with ng serve command is all fine and I can run and use my app.
This is the info about my app:
-> % ng version
_ _ ____ _ ___
/ \ _ __ __ _ _ | | __ _ _ __ / | | | |
/ △ \ | ' \ / _| | | | |/ _
| '| | | | | | |
/ ___ | | | | (| | || | | (| | | | || | | |
// __| ||_, |_,||_,|| _|||
|___/
@angular/cli: 1.0.0
node: 7.2.0
os: linux x64
@angular/common: 2.4.10
@angular/compiler: 2.4.10
@angular/core: 2.4.10
@angular/flex-layout: 2.0.0-beta.4
@angular/forms: 2.4.10
@angular/http: 2.4.10
@angular/material: 2.0.0-beta.2
@angular/platform-browser: 2.4.10
@angular/platform-browser-dynamic: 2.4.10
@angular/router: 3.4.10
@angular/cli: 1.0.0
@angular/compiler-cli: 2.4.10