首页 > 解决方案 > 闪亮应用程序中的 htmloutput 显示 html,但从应用程序移开并完全重定向到该 html

问题描述

我编写了以下代码来在面板中显示一个离线 html 文件的内容。当我移至此选项卡时,它会呈现 html 文件的内容,但会完全远离应用程序。它没有嵌入到面板中。我返回应用程序的唯一方法是使用浏览器中的后退按钮。我缺少的是导致这种情况的原因。

用户界面

 tabPanel("Explore Training Data",
             
             mainPanel(width = 12,
                       htmlOutput(
                         "dataprofilereport"
                       ))),

服务器

getPage <- function() {
    return(includeHTML("output.html"))
  }
  output$dataprofilereport <- renderUI({
    getPage()
  })

谢谢

标签: rshiny

解决方案


推荐阅读