GX2011: dynamic URL attribute
href, src, action or formaction has a string expression as its value.
Cause
href, src, action or formaction has a string expression as its value. A string from data can hold a javascript: address.
Example
package card
props {
Link string
}
<a href={p.Link}>Read</a>gx check reports:
ui/card/Card.gx:7:4: GX2011: attribute "href" needs a typed route or gx.URL, not a dynamic stringFix
- For a page of the app, pass a route value, for example
href={route.Show{ID: p.ID}}. - For an address that is not in the app, pass a
gx.URLvalue.