material icon indicating copy to clipboard operation
material copied to clipboard

TypeError on ng-radio-group

Open hodeyp opened this issue 11 years ago • 5 comments

Hi, i have a radio-group bound to a boolean value.

When the page is loaded I am getting.. TypeError: Cannot read property '$viewValue' of undefined

this is related to line 4484 of the latest master build..

  getViewValue: function() {
    return this._ngModelCtrl.$viewValue;
  },

Once loaded the model is working correctly, but the init seems to be running before the model is ready. not sure of this is a bug in my code (its bound to an angularFire object), but looks like there should be a check in this function to confirm _ngModelCtrl is defined?

hodeyp avatar Jan 08 '15 17:01 hodeyp

Which version of the code? We pushed an update to radio buttons yesterday: https://github.com/angular/material/pull/1123#event-215933865

marcysutton avatar Jan 08 '15 19:01 marcysutton

this is from today's buid.. v0.7.0-rc2-master-9a0b3c3

hodeyp avatar Jan 08 '15 19:01 hodeyp

@hodeyp - do you have a Plunkr or CodePen that demonstrates this issue? We will include a unit test (based on your Plunkr) to verify a fix.

ThomasBurleson avatar Jan 08 '15 21:01 ThomasBurleson

does this work? http://plnkr.co/edit/tlWEJK?p=info

hodeyp avatar Jan 08 '15 22:01 hodeyp

:+1:

ThomasBurleson avatar Jan 08 '15 22:01 ThomasBurleson