----------------------------------------------
src/app/shared/components/employee-form/employee-form.component.ts:15:3 - error TS2564: Property
'employeeForm' has no initializer and is not definitely assigned in the constructor.
Lo solucionamos con ! Escritura ! después de cualquier expresión es efectivamente
una afirmación de tipo de que el valor no es nulo o indefinido:
employeeForm!: FormGroup
-----------------------------------
src/app/shared/components/employee-form/employee-form.component.ts:38:50 - error TS2345: Argument of type 'string | null' is not assignable to parameter of type 'string'.
Type 'null' is not assignable to type 'string'.
const employeeId = this.employee?.id || null;
this.employeesSvc.onSaveEmployee(employee, employeeId!);
-----------------------------------------------------------------------
src/app/shared/components/employee-form/employee-form.component.ts:50:14 - error TS2531: Object is possibly 'null'.
isValidField(field: string): string {
const validatedField = this.employeeForm.get(field);
return (!validatedField?.valid && validatedField?.touched)
? 'is-invalid' : validatedField?.touched ? 'is-valid' : '';
}
------------------------------------------------------------------
otro hay varios con lo mismo
onGoToEdit(): void {
if ( this.navigationExtras.state?.value === 'undefined') {
this.navigationExtras.state.value = this.employee;
this.router.navigate(['edit'], this.navigationExtras);
}
else{
// o de acuerdo a lo que se requiera
//this.navigationExtras.state!.value = this.employee;
//this.router.navigate(['edit'], this.navigationExtras);
}
}
----------------------------------
otro
async onGoToDelete(): Promise<void> {
try {
await this.employeesSvc.onDeleteEmployees(this.employee?.id!);
alert('Deleted');
this.onGoBackToList();
} catch (err) {
console.log(err);
}
}
onGoBackToList(): void {
this.router.navigate(['list']);
}
}
--------------------------
otro con
src/app/app.module.ts:25:49 - error TS2339: Property 'firebaseConfig' does not exist on type '{ production: boolean; }'.
25 AngularFireModule.initializeApp(environment.firebaseConfig)
lo debe de haber explicado en el tutorial o podes consultar esta pregunta que respondieron
https://stackoverflow.com/a/44033177/8957405