Closed Coridyn closed 9 years ago
In tabarray.html if the form.title is a string containing spaces then the interpolation will fail.
tabarray.html
form.title
I've made a demo showing the issue: https://github.com/Coridyn/angular-schema-form/tree/demo/tabarray-broken (Select the "Tab Array (Broken)" example)
and here is a schema+form that does the same thing:
{ "schema": { "type": "object", "title": "Comment", "properties": { "breaks": { "type": "array", "items": { "type": "object", "properties": { "name": { "title": "Name", "type": "string" } }, "required": ["name"] } } } }, "form": [ { "type": "help", "helpvalue": "<h4>This tabarray breaks when the `title` has spaces:</p>" }, { "key": "breaks", "type": "tabarray", "title": "My name", "items": [ "breaks[].name" ] } ] }
The tabarray.html template tries to interpolate form.title which will fail if it contains spaces (because it's not a valid Angular expression):
<a href="#">{{evalExpr(form.title,{'$index':$index, value: item}) || $index}}</a>
Thanks again!
In
tabarray.html
if theform.title
is a string containing spaces then the interpolation will fail.I've made a demo showing the issue: https://github.com/Coridyn/angular-schema-form/tree/demo/tabarray-broken (Select the "Tab Array (Broken)" example)
and here is a schema+form that does the same thing:
The
tabarray.html
template tries to interpolateform.title
which will fail if it contains spaces (because it's not a valid Angular expression):