In express+hbs, how do you define the routed data as a variable on the page?

when using express+hbs, routing incoming data needs to be used in the page js. My idea is to define the data as variables in the data, as follows:

clipboard.png

:

clipboard.png

clipboard.png

is this way of thinking wrong? Or can only write an interface, js directly request the interface to get data, ask for advice! Thank you

Feb.26,2021

var arr = {{JSON.stringify(layoutPage)}}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bcbe26-30ace.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bcbe26-30ace.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?