1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

View not updating when form data changes

Discussão em 'Angular' iniciado por Jonathan Smith, Setembro 26, 2024.

  1. I have a StackBlitz demo here which shows the issue: https://stackblitz.com/edit/demo-nested-forms

    If you wait 2 seconds, the form gets populated by an observable, and you can see the form data as JSON below the coloured blocks. If you change the text in either of the inputs and click off them, you can see the form data gets updated.

    If you then click the "Get new form data" button, it calls the same observable to return the initial object again. This time, although the form data gets correctly "reset" the view is not updated.

    Any ideas why the view is now out of sync?

    Continue reading...

Compartilhe esta Página