I think it has something to do with where the page is redirecting?
I created 2 basic dashboards: Home and File3.
I modified Home.ps1 to what the Pages sample says:
$UDScriptRoot = $PSScriptRoot
$Pages = @()$Pages += New-UDPage -Name ‘Home’ -Content {
New-UDTypography -Text “$UDScriptRoot\Home.ps1”
. “$UDScriptRoot\Home.ps1”
}$Pages += New-UDPage -Name ‘File Three’ -Content {
New-UDTypography -Text “$UDScriptRoot\File3.ps1”
. “$UDScriptRoot\File3.ps1”
}New-UDDashboard -Title ‘Home’ -Pages $Pages
And left File3.ps1 as the default dashboard:
New-UDDashboard -Title “File Three” -Content {
New-UDTypography -Text “Hello, World!”
New-UDButton -Text “Learn more about Universal Dashboard” -OnClick {
Invoke-UDRedirect https://docs.ironmansoftware.com
}
}
When Viewing Home and clicking on “File Three” I get redirected to http://localhost:5000/Home/File-Three
. But if I View File3 directly from VS Code the url is http://localhost:5000/File3/Home
What’s the best way to create pages from multiple ps1 files? I cant do this because I need specific files.