antonmedv / monkberry

Monkberry is a JavaScript library for building web user interfaces
https://monkberry.js.org
MIT License
1.49k stars 78 forks source link

Question: How can I import a Child Template without importing it in the .monk file ? #57

Open alexmarucci opened 5 years ago

alexmarucci commented 5 years ago

Hey Guys,

I am trying to use monkberry in one of my projects and I can see I can Import a child template like so:

{% import child from './child-template' %}

<h1>Main Component</h1>
<!-- Child Template -->
<child />

Is there any alternative way I can Import the child component? I tried this without success.

Monkberry.render(MainTemplate, document.body, {child: ChildTemplate})

Thanks in advance!

antonmedv commented 5 years ago

Import works only with import keyword.