Answer the question
In order to leave comments, you need to log in
Can't access UI field in Angular?
Good day to all!
A very funny thing happened with the interface in Angular.
According to the Angular style guide, I created several models on interfaces (although I always did it on classes).
Here is the code:
export interface Car {
id?: string;
name: string;
}
export interface CarsBlock {
carsMarks: string;
cars: Car [];
}
export interface CarsBlockPage {
CarsBlockList: CarsBlock[];
}
<div *ngFor="let carsBlock of CarsBlockPage.CarsBlockList">
<app-cars-block [carsBlock]="carsBlock"></app-cars-block>
</div>
<div *ngFor="let carsBlock of CarsBlockPage">
<app-cars-block [carsBlock]="carsBlock"></app-cars-block>
</div>
CarsBlockPage.CarsBlockList.unshift(carBlock);
CarsBlockPage[0]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question