I try something like this:
component.ts
displayName: string;
email: string = `user+${this.displayName}@domain.com`;
component.html
<input type="text" [(ngModel)]="displayName" name="displayName">
<input type="email" [value]="email" name="email">
email
is updated once when the app is loaded but not when displayName
changes.
Do I need to use EventEmitter
or ngOnChanges
or anything else?