我正在使用以下代码创建一个R Shiny应用程序。它只有1行。
UI.R
htmlTemplate("template.html", document_ = "FALSE",button = actionButton("action", "Action"))
使用template.html:
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Basic Page Needs -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Title and meta description -->
<title>BLAH</title>
<meta name="description" content="">
<meta property="og:description" content="" />
<!-- CSS -->
<style type="text/css">
body {
background-color: white;
}
div.test {
font-size: 14px;
}
</style>
</head>
<body>
<div class = "test">
{{button}}
</div>
</body>
</html>
问题在于我设置document_ =&#34; FALSE&#34;在htmlTemplate函数中,我收到以下错误:
Warning: Error in registerShinyDebugHook: attempt to set an attribute on NULL
如果我删除此选项,我会丢失我需要使selectInput看起来漂亮的CSS,但我不再有错误。有什么建议吗?