I'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
@fxck this is working for me when tested against the latest code in master. Closing for now - please let me know if this is not resolved and I will reopen.
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"
@robertmesserle well it's not working on whatever is released on npm, http://plnkr.co/edit/uM0WoalscT5Cx4XFev5V?p=preview
You have to include MdRadioGroup in the directives
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
You have to include MdRadioGroup in the directives