internal variable
augiaugi opened this issue · comments
Describe the Issue
I came across that my components are getting $null value from the parameter I pass to the functions.
function New-AppBar
{
param
(
[string]$Titel
)
New-UDHelmet -Content {
New-UDHtmlTag -Tag 'title' -Content {
$Titel
}
}
$Drawer = New-UDDrawer -Children {
New-UDList -Children {
...
}
}
New-UDAppbar -Children {
New-UDElement -Tag 'div' -Content {
$Titel
}
} -Drawer $Drawer
}
New-AppBar -Titel 'ObjectType'
I figured out that after changing the property from -Titel
to -Text
anything worked as expected.
Title is an internal property of UD or one of the component and this can be the reason that my variable was $null.
A error message would have saved me a lot of time and I think this is not the only example that can happen.
Version Information
- Operating System: Win10
- PowerShell Version: 5.1.17763.1007
- Universal Dashboard Version: v3.0.0-beta1
- UD Hosting Method: Powershell
I don't think so. It's just preventing variables like $error from being overwritten. I don't see anywhere in UD where we are setting a variable -Titel
Can you reproduce the issue too?