sonicoder86 / angular2-babel-esnext-starter

Angular development and testing examples with Babel in Javascript (ES6/ES7).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Data inconsistencies

offroadkev opened this issue · comments

commented

In the demo app, if you add a new post, then go to edit another post, you will always see the same data regardless of the post you are trying to edit.

For example if I click 'Angular', edit post, I will still see the data from a different post, not the 'Angular' post.

Hoping this was just in issue with the current demo, I went ahead and installed on my local machine from the command line, and when I loaded the app locally I experienced similar issues. For example, I added a post called 'Test post'. When I saved it and viewed the screen, I saw my new post. I then went to edit the 'ReactJS' post. I change the title to 'ReactJSEdited' and selected 'save. The app took me back to the post archive screen, but instead of editing the 'ReactJS' post with my new title, the 'ReactJS' post stayed the same, but my newly added 'Test Post' was now changed to 'ReactJSEdit' and had all of the data related to the original 'ReactJS' post.

Unfortunately, I'm still pretty noob with MEAN, so I'm not ready to debug this on my own. But if there's anything I can do to help, please let me know and I'll hack away.

Managed to reproduce and the bug came from where i searched for the post by id...used = instead of ==.
Fixed it in c2e6fb7

Will release it to the online version, thanks for finding it.

Released, now it should work as expected.