I working under a webpack solution and using EJS to render my pages and i want to display the hostname (my-domain.com) in the render by the EJS file and avoid to inject from a all_script.js like file
(我在webpack解决方案下工作,并使用EJS渲染页面,我想通过EJS文件在渲染中显示主机名(my-domain.com),并避免从all_script.js之类的文件中注入)
I've tried things like this and that's actually not worked :
(我已经尝试过类似的事情,但这实际上是行不通的:)
<%= window.location.hostname %>
The expected result would be "my-domain.com"(预期的结果将是“ my-domain.com”-->)
ask by PedroZorus translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…