My currency directive in Angular 8.2 formats currency fields for users by using the following code:
<input [(ngModel)]="currentEmployment.monthlyIncome" currency>
@Directive({
selector: '[ngModel][currency]',
providers: [CurrencyPipe, NgModel],
})
export class CurrencyDirective implements OnDestroy {
// implementation details...
}
After updating to Angular 11.2, I encountered the following issues:
- No errors are thrown
- this.model.value is always null
- this.model.valueChanges.subscribe never fires
I'm unsure if this is due to a configuration problem or changes in how the model works. Any insights would be appreciated.