@dangl/web-components-ava 1.2.3-beta0019 → 1.3.0-beta0032

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +11 -6
  2. package/invoice.js +1 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -139,13 +139,18 @@ export interface IConfigurationTree {
139
139
  ### Invoice Component
140
140
 
141
141
  ```html
142
- <ava-invoice-display id="invoiceTree"></ava-invoice-display>
142
+ <ava-invoice-display id="your-unique-id"></ava-invoice-display>
143
143
  <script>
144
- const INVOICE = {...};
145
- window['InvoiceGlobalVariable'] = INVOICE;
146
- // The config is optional
147
- const invoiceView = document.getElementById('invoiceTree');
148
- invoiceView.config = {...};
144
+ const invoiceData = {...}
145
+ const invoice = document.getElementById('your-unique-id');
146
+ // You can also directly set a JSONified invoice object as your attribute value in the html markup
147
+ invoice.setAttribute('invoice', JSON.stringify(invoiceData));
148
+ invoice.setAttribute(
149
+ 'config',
150
+ JSON.stringify({
151
+ language: 'de',
152
+ }),
153
+ );
149
154
  </script>
150
155
  ```
151
156