question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: [Bug] ngModel not working in ion-toggle, ion-searchbar with new Form API

See original GitHub issue

Type: <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: image

</span>

<span is-issue-template></span>

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
luchillo17commented, Jul 12, 2016

I didn’t though it was that until now that i replicated the issue and it worked until i made the deprecation provider thing.

0reactions
jgw96commented, Jul 12, 2016

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found