Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reading data from JSON - Beyond CRUD #10

Closed
ashasaji opened this issue May 10, 2018 · 3 comments
Closed

Reading data from JSON - Beyond CRUD #10

ashasaji opened this issue May 10, 2018 · 3 comments

Comments

@ashasaji
Copy link

Hello,

I am a newbie to Angular and able to do my first trail with your working example. Thank you so much.

Have to improve my UI, with additional data - Sample UI/ JSON attached.

  1. I will have non-tabular data along with multiple no. of tabular data. (I will have multiple tables one after the other in the final UI.)
  2. My first trial was sucessful - I had ONLY list of products in the JSON and it was working properly. Then I have added additional data elements in JSON n HTML as reflected in attached pic (like patient age/gender/country..etc).
  3. After the JSON update, without any code change, console showed the correct data on console (exampledatabase)
  4. However MatTable earler populated with list of products is loosing data.

Pls help me..

** I do not know how to change data service/ model / loaddata()...etc according to new data.
** Are there any additional changes reqd to accomplish above remnt?
** I will have to use more tables in the UI in similar manner - If so, JSON change followed by model and Html changes are sufficent?

Thanks in advance
ASHA
ui with crud

@ashasaji
Copy link
Author

Am adding pic of data service
dataservice

@marinantonio
Copy link
Owner

Hello Asha,
I'm quite busy these days so I cannot dive much into your code. Few key things tho, MatTable data is stored into this.exampleDatabase.dataChange.value array. If you're making any changes make sure they end up there, and after doing operation call in refresh table function. Debug that array in console and try to figure out what's happening.
Thanks

@ashasaji
Copy link
Author

Thanks Marian..!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants