What i want is to build webpages that have the same variable and root URL, but have it load a different page with different functionality on each. However, in my example below any link is just loading /Debug/:id and ignoring the rest of the URL. Is this expected behavior? Or a bug?
$Pages = @()
$Pages += New-UDPage -Name 'Debug' -Content {
New-UDForm -Content {
New-UDTextbox -Id 'txtID' -Label 'ID'
} -OnValidate {
If ($Eventdata.txtID -eq '') {
New-UDFormValidationResult -ValidationError "ID can't be blank"
}
else {
New-UDFormValidationResult -Valid
}
} -OnSubmit {
Invoke-UDRedirect -Url "/Debug/$($EventData.txtID)"
}
}
$Pages += New-UDPage -Name 'Debug ID' -Url '/Debug/:id' -Content {
New-UDTypography $ID
New-UDButton -text "Test After ID" -OnClick {
Invoke-UDRedirect "Debug/$ID/Test" -OpenInNewWindow
}
New-UDButton -text "Test Before ID" -OnClick {
Invoke-UDRedirect "Debug/Test/$ID" -OpenInNewWindow
}
}
$Pages += New-UDPage -Name 'Debug ID TEST' -Url '/Debug/:id/Test' -Content {
New-UDTypography "$ID Test"
}
$Pages += New-UDPage -Name 'Debug ID TEST' -Url '/Debug/Test/:id' -Content {
New-UDTypography "Test $ID"
}
New-UDDashboard -Title 'PowerShell Universal' -Pages $Pages
Product: PowerShell Universal
Version: 3.3.4