Commit 308efca7 authored by Tejesh's avatar Tejesh 🖖
Browse files

update docs, catch promise errors

parent 6c3e9a03
Pipeline #85554 passed with stage
in 2 minutes and 49 seconds
......@@ -44,7 +44,7 @@ You can use subtemplates as follows:
<template class="tmpl-head" src="heading.html" data-target="false"></template>
<template class="main" data-template-head=".tmpl-head">
<template class="main" data-template-header=".tmpl-head">
<%= head({title: "Page title"}) %>
......@@ -57,7 +57,7 @@ You can use subtemplates as follows:
`data-target="false"` ensures that the subtemplate `.tmpl-head` is not rendered.
`data-template-head=".tmpl-head"` creates a function `tmpl()` inside the `.main`
`data-template-header=".tmpl-head"` creates a function `header()` inside the `.main`
template. Calling this function renders the sub-template in the selector
......@@ -46,6 +46,9 @@ export function template(data, options) {
dependent_templates.then(function () {
execute_render($this, $this, data, options)
.catch(function (error) {
console.error(error) // eslint-disable-line no-console
} else {
execute_render($this, $this, data, options)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment