modulerizr
Version:
Integrate a powerful, component based architecture to your legacy project in just a few steps
23 lines (18 loc) • 652 B
HTML
<html lang="en">
<head>
<title>Include a Component plain Textcomponent</title>
</head>
<body>
<!-- This will be rendered to <div>Hello</div> -->
<hello-world></hello-world>
<!-- This will be rendered to <div>Hello Gustav!!!</div> -->
<hello-world>Gustav!!!</hello-world>
<!-- This will be rendered to <div><span>1</span><span>Hello</span><span>2</span></div> -->
<hello-world-slot-named>
<span slot="before">1</span>
<span slot="after">2</span>
<span>This Text won't be visible because no default slot exists in the component.</span>
</hello-world-slot-named>
</body>
</html>