Async data in ngModel
问题 I have form with async data binded from server: <form> <input [(ngModel)]="currentService.user.username"> <input [(ngModel)]="currentService.user.email"> </form> It's work only if i add *ngIf="currentService.user" to form, but i want render inputs without value, before i get data from server. But i get errors: 'Cannot read property 'username' of undefined' How can i solve this? Probably, i need something like async pipe to ngModel, but this is does not work, obviously. 回答1: You could Try this