I have a form in my component, and I would like access to input value attribute from my model in controller.
I can access to the firs, because I give the value, but second is calculated by pipe and I.can't get this value.
Component
<form class="formQuote" #newQuote="ngForm" (ngSubmit)="onSubmit(newQuote)">
<input type="number" name="quantity" class="form-control" #quantity="ngModel" [(ngModel)]="cart.quantity" placeholder="1">
<input name="precio" #price="ngModel" [(ngModel)]="cart.price" [disabled]="true" value="{{serviceSelected | calcPrice : quote.kg : cart.quantity : true | currency:'MXN':symbol:'1.2-2'}}">
<button mat-stroked-button color="primary" type="submit">Add</button>
</form>
Controller
export class TableQuoteComponent implements OnInit {
cart: ShoppingCart = {};
constructor(private cartService: PrepayService) { }
ngOnInit() {
}
onSubmit(newObj) {
this.cart = newObj.value;
this.cartService.addData({...this.cart});
}
}