template icon indicating copy to clipboard operation
template copied to clipboard

Pug Attribute Interpolation Not Accepted By View Engine

Open alphonso06 opened this issue 3 years ago • 1 comments

I'm trying to work with Pug's Attribute Interpolation.

But for example, if I want to render a link that has some query parameters from the server with it:

v1.Get("/layout", func(c *fiber.Ctx) error {
	return c.Render("index", fiber.Map{
		"value": "some-important-string-goes-here",
	}, "layouts/main")
})
a(href=`/somewhere?key=${value}`) Link

I would instead get an error:

views: template: index:15: bad number syntax: "+v"

I'm trying to figure out the subtle differences between this view engine and the one's described in Pug's official documentation. Any ideas what I'm doing wrong? Thanks. 😁

alphonso06 avatar Jan 20 '23 11:01 alphonso06

have you found the root cause ?

ReneWerner87 avatar Mar 23 '23 06:03 ReneWerner87