Its ok to use value
or ngValue
.
The only difference between two is that value
is always string, where in ngValue
you can pass object
More Related Contents:
- Angular error: “Can’t bind to ‘ngModel’ since it isn’t a known property of ‘input'”
- Confirm password validation in Angular 6 [duplicate]
- Set focus on element
- How to use Angular4 to set focus by element id
- Get access to FormControl from the custom form component in Angular
- Create a reusable FormGroup
- Can’t bind to ‘formControl’ since it isn’t a known property of ‘input’ – Angular2 Material Autocomplete issue
- Angular2 If ngModel is used within a form tag, either the name attribute must be set or the form
- Limit input field to two decimal places – Angular 5
- How to dynamically add FormControl to FormArray on button click in Angular?
- How to show a loading spinner while waiting on an observable getting data from a service in Angular
- Why use “?” operator in template binding?
- angular2 manually firing click event on particular element
- How can I watch for changes to localStorage in Angular2?
- Angular 2 – How do I navigate to another route using this.router.parent.navigate(‘/about’)?
- How to make directives and components available globally
- Angular2 router keep query string
- Angular2 – Validate and submit form from outside
- In Angular, how to add Validator to FormControl after control is created?
- Angular 2 Dynamically insert a component into a specific DOM node without using ViewContainerRef
- Angular 2 – Using Shared Service
- Mat-table Sorting Demo not Working
- How to enable production mode?
- How to correctly import operators from the `rxjs` package
- Class is using Angular features but is not decorated. Please add an explicit Angular decorator
- Angular Mat Select Multiple selectionchange finding which option was changed
- Call a function every 10 seconds Angular2
- Angular 4: “Cannot find name ‘require’
- `[(ngModel)]` vs `[(value)]`
- Angular Material2 theming – how to set app background?