We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
it is possible to parse a edge object to normal javascript object? I am trying to pass a object to "data" attribute from datatables plugin
My .edge template
var myTable = $('#dataTable').DataTable({ dom: 'tpi', data: {{data}}, columns: [ @each(item in colunas) { data: '{{item}}'}, @endeach ] })
The result:
var myTable = $('#dataTable').DataTable({ dom: 'tpi', data: [object Object], //HERE IS THE PROBLEM columns: [ { data: 'id'}, { data: 'name'}, { data: 'description'} ] })
The text was updated successfully, but these errors were encountered:
You need to say, {{ toJSON(data) }}.
{{ toJSON(data) }}
Sorry, something went wrong.
{{ toJSON(data) }} does indeed output the object but it converts quotes to "e;
PSG.test = {{toJSON(test)}}
becomes:
PSG.test = { "id": 23, "desc": "testing a test" }
{{{ toJSON(data) }}} does work!
{{{ toJSON(data) }}}
No branches or pull requests
it is possible to parse a edge object to normal javascript object?
I am trying to pass a object to "data" attribute from datatables plugin
My .edge template
The result:
The text was updated successfully, but these errors were encountered: