generator-angular-2-crud
generator-angular-2-crud copied to clipboard
Edit of newly created item is not reflected in the UI
I get a list of items, then press "New Item" button. The item is created in place as the first element in the UI. If i then edit it, the form data is sent to the server and a response comes back, but the data in the UI is not updated. If i try to edit an item which had already existed, then all works ok..
hmm - this could be put down to a user error potentially. There are several checks throughout the generated code which match the "Id" value. They are all strict checks (!== and ===). I relaxed the checks (!= and ==) and it all worked. The issue was that my php server code code was returning the id as a string, which in some instances did not match the same value, as an integer.