I\'m using this statement in my html template:
[(ngModel)]=\"tempProduct.unitprice | number : \'1.2-2\'\"
But when i run it im getting this
Perhaps this should work for you:
[ngModel]="tempProduct.unitprice | number : '1.2-2'" (ngModelChange)="tempProduct.unitprice = $event"
This way "two-way"-binding is split in property-binding and event binding which allows more complex expressions.
Thanks! Fun fact: this works with ng2-dragula too!
<div [dragula]="'COPYABLE'" [dragulaModel]="service.model.players | PlayerFilterPipe: queryString" (ngModelChange)="service.model.players = $event">
<div *ngFor="let player of service.model.players | PlayerFilterPipe: queryString">{{player.name}}</div>