Problem to bind [(ngModel)] in <md-radio-group> highlight at startup fails with class attribute
See original GitHub issueHey people,
I’m using Angular Material beta 7, and I have a component with the following code snippet
{{question.answer}}
<md-radio-group [(ngModel)]="question.answer" name="question{{i}}">
<div id="problem" *ngFor="let alternative of question.alternatives" class="my-class">
<md-radio-button [value]="alternative.id">
{{alternative.title}}
</md-radio-button>
<div>remove<div>
</div>
</md-radio-group>
if the div#problem
has class
attribute the [(ngModel)]="question.answer"
in md-radio-group doesn’t bind when the component is started, see below behavior when div#problem
does not have class
attribute:
But if I add class
attribute, the bind does not work when the component is started.
Demo: http://plnkr.co/edit/k3xXPY?p=preview
Simulate the problem when you add and remove class
in div#problem
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Default radio button select value angular material 2
In my case the selection issue has been resolved by replacing the name="howLong" attribute with [ngModelOptions]="{standalone: true}" .
Read more >Can't bind to 'ngModel' since it isn't a known property of 'input'
To fix Can't bind to 'ngModel' since it isn't a known property of 'input' error in Angular we have to import FormsModule in...
Read more >Can't bind to 'ngModel' since it isn't a known property of 'input ...
https://codedocu.com/Software/Angular/Angular- Error /Angular- Error -NG8002_colon_-Cant- bind -to- ngModel -since-it-isnt-a-known- property -of- ...
Read more >angular/material2 - Gitter
EXCEPTION: Error in ./CreateQuestion class CreateQuestion - inline template:17:0 caused by: md-input-container must contain an mdInput directive.
Read more >Angular Material Interview Questions & Answers - Wisdom Jobs
ng-model : Assignable angular expression to data-bind to. name: Property name ... a child. md-input-container also supports error handling using the standard ...
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
Closing this issue because it’s apparently a bug in the Angular Flex Layout
Check: https://github.com/angular/flex-layout/issues/322
Thank you @willshowell
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.