md-radio-group "No value accessor for x"
See original GitHub issueI’m trying to use md-radio-group
, like this
<form [ngFormModel]="form">
<md-radio-group
[ngModel]="data.foo"
ngControl="foo">
<md-radio-button *ngFor="#option of radioButtonOptions" [value]="option.value">
{{ option.label }}
</md-radio-button>
</md-radio-group>
</form>
along with
class WhateverCmp {
public data = { foo: null };
public radioButtonOptions = [
{
label: 'Bar',
value: 'bar'
},
{
label: 'Baz',
value: 'baz'
}
];
constructor(private _fb: FormBuilder) {
this.form = _fb.group({
foo: [ '', Validators.required ]
});
}
}
and I’m getting ORIGINAL EXCEPTION: No value accessor for 'foo'
using alpha.3 and angular b.16
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
<mat-radio-button> : No value accessor - Stack Overflow
Try to set formControlName="SearchType" on <mat-radio-group> and not on <mat-radio-button> .
Read more >angular/material2 - Gitter
CreateQuestion class CreateQuestion - inline template:13:39 caused by: No value accessor for form control with name: 'choice'.
Read more >Material radio-button, getting "ERROR Error: No value ... - Reddit
I am trying to use material radio buttons in a reactive form but get the error message ERROR Error: No value accessor for...
Read more >UNPKG - @angular/material
When this module is loaded\n * without NoConflictStyleCompatibilityMode ... n * @param {?} x Coordinate within the element, along the X axis at...
Read more >Angular Material Mat-Radio-Button Default Checked Not ...
get Error: ERROR Error: No value accessor for form control with name: 'gender' mat-radio-button should support formControlName withiout parrent radio ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You have to include MdRadioGroup in the directives
I am experience this issue as well.
Using: @angular/core: “2.0.0-rc.1” @angular2-material/core: “^2.0.0-alpha.4” @angular2-material/radio: “^2.0.0-alpha.4”
http://plnkr.co/edit/sMHZESGaE4qjHCshmnzO?p=preview