Сначала необходимо инициализировать переменную typeOfProofObj
, а затем попытаться получить доступ к ее свойствам.
@Component({
selector: 'my-app',
templateUrl: './app.component.html',
styleUrls: [ './app.component.css' ]
})
export class AppComponent {
name = 'Angular';
typeOfProofObj: DropdownModelWithtitle = { title: null, dropDownOptions: null };
constructor() {
this.typeOfProofObj.title = "ss";
this.typeOfProofObj.dropDownOptions = [ {displayName: 'ss', value: 'sss'} ];
}
}