Skip to content

Pug Attribute Interpolation Not Accepted By View Engine #218

Description

@alphonso06

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. 😁

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🤔 QuestionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions