mdRadioGroup - Issue with ng-change for the radio button
I use v0.6.1. When I try to use ng-change derective for the radio button like:
I'm getting an error in the concole: Error: [$compile:ctreq] http://errors.angularjs.org/1.3.6/$compile/ctreq?p0=ngModel&p1=ngChange
Br, Aleh
@Autushka - plz provide a CodePen or Plunkr example.
Hello Thomas
Here is the example at plnkr: http://plnkr.co/edit/XckbEvtIYlJKRMtbs8UC?p=preview As soon as ng-change directives are removed from html radio buttons start working.
Br, Aleh
ng-change requires ng-model. If you try this:
<md-radio-group ng-model="sSelectedResetType" ng-change="onTypeChange()">
<md-radio-button value="userName">Username</md-radio-button>
<md-radio-button value="email">Email</md-radio-button>
</md-radio-group>
all works well.
Documentation is incorrect. ngChange is listed as belonging to md-radio-button: https://material.angularjs.org/latest/api/directive/mdRadioButton
+1
+1 to @STOpandthink, thankfully I found this thread as I've been banging my head against the wall trying to work this out!
+1.
+1
+1
I noticed this too, still an issue after a few months