Abortive attempt to set up a trivial web application
This commit is contained in:
parent
a1dc573fc5
commit
fb2fcf4d36
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head> <meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title> My first web component with typescript </title>
|
||||
</head>
|
||||
<body>
|
||||
<app-component name="TypeScript"></app-component>
|
||||
<script type="module" src="./dist/app-component.js"></script>
|
||||
</body>
|
||||
</html>
|
21
visions/ui/src/app-component.ts
Normal file
21
visions/ui/src/app-component.ts
Normal file
@ -0,0 +1,21 @@
|
||||
import {html, css, LitElement} from 'lit';
|
||||
import {customElement, property} from 'lit/decorators.js';
|
||||
|
||||
export class SimpleGreeting extends LitElement {
|
||||
static styles = css`p { color: blue }`;
|
||||
name: String;
|
||||
|
||||
static properties = {
|
||||
name: { type: String }
|
||||
};
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.name = 'Somebody';
|
||||
}
|
||||
|
||||
render() {
|
||||
return html`<p>Hello, ${this.name}!</p>`;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user