mirror of
https://github.com/marko-js/marko.git
synced 2026-01-25 15:03:04 +00:00
16 lines
404 B
JavaScript
16 lines
404 B
JavaScript
var helloComponent = require('./components/hello');
|
|
|
|
module.exports = {
|
|
onMount: function () {
|
|
var self = this;
|
|
helloComponent.renderToString({
|
|
name: this.input.name
|
|
}, function (error, html) {
|
|
if (error) {
|
|
self.emit('renderError', error);
|
|
} else {
|
|
self.emit('html', html);
|
|
}
|
|
});
|
|
}
|
|
}; |