Dmitry Gavrilenko2016-09-02 22:23:55
Design patterns
Dmitry Gavrilenko, 2016-09-02 22:23:55

Angular2 binding not working?

Hi everybody.
I have two projects. "Under the hood" there are Injectable providers. Everything in the projects seems to be identical, except for the logic of the providers.

  1. Loading page, components. Using ngFor to display array elements
  2. The page has data entry fields with the help of which the provider array is replenished with new data
  3. console.log(array) shows that the array has been updated with a new element
  4. Data output via ngFor is updated on the page

That's problem number
4 ! In one project it happens, in the other it doesn't. imports are the same. The only difference is that one provider stores typed (class) data locally + localStorage, while the other stores JSON objects and only locally.
PS: I left the web a long time ago. Became a desktop application developer. Then, the web seemed gray and tedious. I have been sitting with him for the 4th day and, to be honest, I am very carried away. I want to be back on the web

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question