Working with the bootstrap-treeview package in Laravel 5.1:
function getTree() {
...
$.ajax({
type: 'GET',
url: loadUrl,
dataType: "json",
})
.done(function (response) {
return response;
})
.fail(function (response) {
console.log(response);
});
}
$('#tree').treeview({data: getTree()});
This code is working, it gives me a proper JSON response, so routes etc are correct and working.
When I take the raw response out of firebug and add it as a manual response to getTree (return [the raw json returned by getTree];) bootstrap-treeview shows exactly what's expected.
When I compare both JSON strings (the above method and raw pasted in getTree) in the html source of the page they are EXACTLY the same.
I am pulling my hair out for a day now. What can be the issue here?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire