angular-dynamic-forms
angular-dynamic-forms copied to clipboard
No Documentation for Attributes / ID Attribute Not Supported
The documentation is pretty good, and I love the library, but there does not appear to be any example for how to add attributes. The documentation just says that you apply key:value pairs but does not provide an example of the syntax.
Could you please provide an example?
Also, it might be useful if developers could apply an ID directly to a particular item. It does not appear that ID is supported.
Thank you!
ID is an attribute just like any other, so just drop it in the attributes option.
As for key-value pairs, maybe describing the option as an object would help...
[
{
"type": "textarea",
"model": "example",
"attributes": {
"class": "example attributes",
"id": "example-with-attributes"
},
"placeholder": "This is an example of using the 'attributes' option on a form element..."
}
]