mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
21 lines
455 B
JavaScript
21 lines
455 B
JavaScript
var helloComponent = require("./components/hello").default;
|
|
|
|
module.exports = {
|
|
onMount: function () {
|
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
var self = this;
|
|
helloComponent.renderToString(
|
|
{
|
|
name: this.input.name,
|
|
},
|
|
function (error, html) {
|
|
if (error) {
|
|
self.emit("renderError", error);
|
|
} else {
|
|
self.emit("html", html);
|
|
}
|
|
},
|
|
);
|
|
},
|
|
};
|