AngularJS sprawdzanie tablicy obiektów
export interface InspectionSchedule {
id: number,
propertyId: number,
inspectionScheduleUnitArtifactDto: InspectionScheduleUnitArtifactDto[]
}
export interface InspectionScheduleUnitArtifactDto {
id: number,
inspectionScheduleUnitContactArtifactDto: InspectionScheduleUnitContactArtifactDto[]
}
export interface InspectionScheduleUnitContactArtifactDto {
id: number,
inspectionScheduleUnitArtifactId: number,
primaryContactName: string
}
//Importing
containsZeroLengthArray(inspectionSchedule: InspectionSchedule) {
return inspectionSchedule.inspectionScheduleUnitArtifactDto
.some(contact => !contact.inspectionScheduleUnitContactArtifactDto.length);
}
SAMER SAEID