Error passing server variable to edge component


How to pass controller parameter to edge component.


Component code is


where “total” is what i set as return from controller.

return view.render(‘home.sites’,{“total”:13})

No error is thrown, but the value is empty inside component. whereas its correct value in .edge file


Can you please format your codeblocks properly :pray:

Interpolation is used when you are using variables inside raw text and not when using tags.

@!component('components.datatable', id='dataTable', total=total)


Thank you @virk, it worked.