remove await $.render from docs

This commit is contained in:
Cleon 2023-01-08 13:56:10 +13:00
parent b1d641077d
commit 328982dbe5
2 changed files with 3 additions and 3 deletions

View file

@ -109,7 +109,7 @@ const customer = customers.filter( e => e.id==inv.customer ).at(0);
const template = $.blocks.at(0);
// render the template passing in the customer and invoice
const html = await $.render( template, { customer, inv } );
const html = $.render( template, { customer, inv } );
// create an html invoice file and open it in the default browser, from there it can be saved as a PDF
await $.io.output( `inv ${inv.id}.html`, html, true );

View file

@ -87,7 +87,7 @@ Here's an example:
const mytemplate = 'Hello {{name}}';
const mydata = { name:'World' };
const result = await $.render( mytemplate, mydata );
const result = $.render( mytemplate, mydata );
await $.ui.message( result );
```
@ -109,7 +109,7 @@ The meld-build block to run:
const template = $.blocks.at(0); // gets the first non-meld-build block in the note
const data = { name:'John', message:'How are you?' };
const result = await $.render( template, data );
const result = $.render( template, data );
await $.ui.message( result );
```