Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monkberry.compile('Component', code) is undefined #3

Open
pikhovkin opened this issue Jun 18, 2018 · 2 comments
Open

Monkberry.compile('Component', code) is undefined #3

pikhovkin opened this issue Jun 18, 2018 · 2 comments

Comments

@pikhovkin
Copy link

I use https://cdn.jsdelivr.net/npm/monkberry-standalone@latest/monkberry.min.js

Run

var source = Monkberry.compile('Component', '<div>{{ text }}</div>');

console.log(typeof source); // undefined
console.log(typeof Component); // string

How should this work? What to do with this?
The Component should be a function, and the string returned.

@antonmedv
Copy link
Member

Show full example on jsbin

@pikhovkin
Copy link
Author

Hmm, your example with 'name' title don't work, but other title, for example, 'component' is working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants