Giter Club home page Giter Club logo

Comments (5)

ssougnez avatar ssougnez commented on April 28, 2024 2

I already updated my code to use ngModelOptions, however, I tried this version on the failing stackblitz and I can reproduce the issue so I guess it is correctly fixed :-)

Thanks for the quick action.

from angular.

AndrewKushnir avatar AndrewKushnir commented on April 28, 2024 1

@ssougnez thanks for reporting the issue and providing a repro. The issue might be related to #54864 and we are working on a fix. While working on a fix for #54864, we can put together a test that would check Forms behavior as well. Will keep this thread updated once we make more progress.

from angular.

AndrewKushnir avatar AndrewKushnir commented on April 28, 2024 1

Quick update: I've confirmed that the root cause of this issue is the same as the one from #54864. We are working on a fix and will keep this thread updated once the fix is available.

And just out of curiosity, is it a bad practice to have a component using ngModel for just one two-way binding without using ngModelOptions?

If you do not rely on that <input> to act as a part of a larger form (and only used to sync a value between an input and a class field), you may consider using the ngModelOptions.standalone flag.

It never occurred to me so I was not doing it but now that I'm facing this issue, I'm wondering whether I should start using ngModelOptions in these cases.

The issue was caused by the bug in Angular's code, adding @defer should not cause the error in your scenario.

from angular.

ssougnez avatar ssougnez commented on April 28, 2024

Okay thanks.

And just out of curiosity, is it a bad practice to have a component using ngModel for just one two-way binding without using ngModelOptions?

It never occurred to me so I was not doing it but now that I'm facing this issue, I'm wondering whether I should start using ngModelOptions in these cases.

from angular.

AndrewKushnir avatar AndrewKushnir commented on April 28, 2024

Quick update: the fix for this issue was merged and released as a part of Angular v17.3.2 (available on NPM). Please let us know if you still see the issue after updating to v17.3.2.

from angular.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.