bug: [Bug] ngModel not working in ion-toggle, ion-searchbar with new Form API
See original GitHub issueType: <span ionic-type>bug</span>
Ionic Version: <span ionic-version>2.x</span>
Platform: <span ionic-platform>all</span>
<span ionic-description>The ion-searchbar
and ion-toggle
outputs errors with [(ngModel)]
since last update to ionic-angular
beta.10 with the next code:
<ion-searchbar debounce='200' [(ngModel)]="searchQuery" placeholder='Buscar'></ion-searchbar>
<ion-toggle [(ngModel)]="toggleValue"></ion-toggle>
export class CustomersPage {
public searchQuery: string = ''
public toggleValue: boolean = true
...
}
Error output:
<span is-issue-template></span>
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
[Bug] ngModel not working in ion-toggle, ion-searchbar with ...
Type : bug. Ionic Version: 2.x. Platform: all. The ion-searchbar and ion-toggle outputs errors with [(ngModel)] since last update to ...
Read more >Can't bind to 'ngModel' since it isn't a known property of 'input'
If I do nothing else except add formControlName="myControl" to any <ion-input> anywhere in the form, I get the ngModel binding error message.
Read more >ion-searchbar - Ionic Framework
Search bars represent a text field that can be used to search through a collection. Learn to input Ion-Search Bar as an icon...
Read more >ERROR: 'Can't bind to 'ngModel' since it isn't a known property of 'p ...
Error : If ngModel is used within a form tag, either the name attribute must be set or the form control must be...
Read more >Webservices and cloud communication - European Commission
You might encounter some platform specific problems during development that ... Navigation in Ionic works like a simple stack, where we push new...
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 Free
Top 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
I didn’t though it was that until now that i replicated the issue and it worked until i made the deprecation provider thing.
Ahh, so the issue is that we do not support the new refactored forms module yet, although this has already been fixed for the upcoming beta.11 release. Thanks for using Ionic! For now i would recommend using the deprecated forms api.