在此“ .hamlet”代码中,我想知道^{copyright}
行的含义是什么>
$doctype 5
<html>
<head>
<title>#{pageTitle} - My Site
<link rel=stylesheet href=@{Stylesheet}>
<body>
<h1 .page-title>#{pageTitle}
<p>Here is a list of your friends:
$if null friends
<p>Sorry, I lied, you don't have any friends.
$else
<ul>
$forall Friend name age <- friends
<li>#{name} (#{age} years old)
<footer>^{copyright}
在此“ .hamlet”代码中,我想知道^ {copyright}第$ doctype 5行的含义是什么
您被链接的示例可能会有些混乱,因为您在任何地方都看不到copyright
功能。 copyright
只是另一个功能。您可以使用^{..}
功能将另一个小部件嵌入其中。这个例子可能对您有帮助: