render dashboard as htmlOutput

...i'm trying to make a multi-pages app but the problem is that i don't get a reaction from a button that is supposed to redirect me to the app page, here is my code:

library(shiny)
library(shinyjs)
library(shinythemes)
library(shinydashboard)

render_page <- function(..., f) {
  page <- f(...)
  renderUI({
    fluidPage(page, title = title)
  })
}

ui_index <- function(...) {
  basicPage(
    actionButton("go","Go to App")
  )
}

ui_app <- function(...){
  dashboardPage(
    dashboardHeader(),
    dashboardSidebar(),
    dashboardBody()
  )
}

ui <- (htmlOutput("page"))


server <- function(input, output, session){
  output$page <- render_page(f = ui_index)

  observeEvent(input$go,{
    output$page = render_page(f = ui_app)
  })
}

shinyApp(ui = ui,server = server)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.