Closed emmavray closed 1 year ago
When setting attributes (not properties) you have to keep in mind that some attribute names are different than the corresponding property names. Property names are camelCased, whereas attribute names are kebab-cased. In your case, the textFormat
property is set as text-format
attribute. So the complete HTML would be:
<circle-progress text-format="value" value="50" max="100"></circle-progress>
I updated the docs to reflect that. You can now see the attribute name corresponding to each property in the properties table.
thanks for the quick response -- I suspected it would be something simple!
I'm linking this library from the CDN in a static html page, which is packaged as a standalone html document with no dependencies. I'm using the CDN example from the README:
I'd like to specify some properties (such as textFormat) using html attributes:
<circle-progress textFormat="value" value="50" max="100"></circle-progress>
This doesn't work. The problem may be obvious to frontend developers (which I am not) but I'm unsure how this should work in an environment when I cannot import a node module or a local js file.
Is what I'm trying to do even possible, or are these attributes only available via the constructor when creating the object in js?