-
Notifications
You must be signed in to change notification settings - Fork 21
Description
Not sure whats going on here but checkout this layout function.
pub fn layout() -> content::Html<String> {
content::Html(html!(
<>
<HTML5Doctype />
<html lang={"en"}>
<head>
<title>{"Test"}</title>
<link href={"https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"} rel={"stylesheet"}></link>
<script src={"/assets/main.js"}></script>
</head>
<body>
<Header />
<Nav title={"My title"} body={"Once you have their money, you never give it back."} />
<div>{"Title"}</div>
</body>
</html>
</>
))
}
When I use the above, the entire body content gets rendered inside of the <script> tag. However if I add an empty template string inside the script tag it will work fine... like this...
<script src={"/assets/main.js"}>{""}</script>
I'm assuming that it's not closing out empty tags.
wez
Metadata
Metadata
Assignees
Labels
No labels