ngModel not work
See original GitHub issueI want to use radio buttons. but I can’t get model value…
This is my code:
<div class="form-group row">
<label class="col-sm-2 form-control-label">gender</label>
<div class="col-sm-10 btn-group" [(ngModel)]="gender" ngbRadioGroup name="gender" ngDefaultControl>
<label class="btn btn-primary">
<input type="radio" value="M" name="gender"> Male
</label>
<label class="btn btn-primary">
<input type="radio" value="F" name="gender"> Female
</label>
</div>
<em>gender: {{gender}}</em>
</div>
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Angular 2 two way binding using ngModel is not working
The answer that helped me: The directive [(ngModel)]= not working anymore in rc5. To sum it up: input fields now require property name...
Read more >Angular 4 ngModel binding not work?
I tried many ways to get a two-way binding, not work. Seems Mdb not support Angular 4 ... To use ngModel, should import...
Read more >Angular—Can't Bind to ngModel, Not a Known Property of input
The downside is that you have to use import statements to load the parts your component needs. The only reason that the ngModel...
Read more >Can't bind to 'ngModel' since it isn't a known property of 'ng ...
I'm trying to use the official example, but I can not make it work. The example and the page not load. This error...
Read more >Angular error Can't bind to 'ngModel' since it isn't a ... - YouTube
Learn Angular in Mumbai offline http://stepbystepschools.net/For more such videos visit http://www.questpond.comSee our other Step by Step ...
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
@scttcper in that example they use ngModel in div elements. https://ng-bootstrap.github.io/#/components/buttons/examples
@alobban You are using the old version of ng-bootstrap. The problem is that no found the module NgbRadio, because the your version don’t have.