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

Local json file data #18

Closed
butaninilesh opened this issue Aug 29, 2018 · 5 comments
Closed

Local json file data #18

butaninilesh opened this issue Aug 29, 2018 · 5 comments

Comments

@butaninilesh
Copy link

Hi,
I have download code here and demo code is working fine.
But, I have faced issue, when I load json data from local directory and load to JSOn editor.

jsonRead(): void{
this.demoservice.getConfig().subscribe(d => {
this.data = d;
this.changeData();
console.log(this.data);
});
}

Updated json data is not reflected in json editor template.

Can you please give a solution for the same?

Thanks,
Nilesh.

@mariohmol
Copy link
Owner

How is this d? Is a string? is not missing JSON.parse?

try to do this.data= { test: true } and see if the jsoneditor show this data

@butaninilesh
Copy link
Author

butaninilesh commented Aug 30, 2018

As suggested, I have assigned static JSON.

jsonRead(): void{
this.demoservice.getConfig().subscribe(d => {
this.data = { test: true };
this.changeData();
console.log(this.data);
});
}

-I have attached image file here.Please verify editor as well as browser console for the same.
-Data has been changed but not reflected in Editor.
demo editor data

@mariohmol
Copy link
Owner

its necessary to se all code.. html ts... maybe try to get the demo from this repo and work from there.. doing change by change until you see what might be wrong

@mariohmol
Copy link
Owner

Hi, could u figure it out?

@mariohmol
Copy link
Owner

Hi.. i'm closing for now.. if u still with this issue please come back so we can figure it out

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