The basis is, turn working and existing html into a glimmer component.
The html might look like this:
<!-- woohoo.html -->
<script>
const sayHello = () => {
console.log('hello');
}
document.getElementById('woohoo').addEventListener('click', sayHello);
</script>
<style>
button {
border: 1px solid blue;
color: blue;
background: white;
}
</style>
<button id="woohoo">Woohoo</button>
It has three elements to it:
- markup
- styling
- behavior
Changing the file name from woohoo.html
to woohoo.gc
would make it continue to work !!!! (that's the whole point of this design)
Now let's give it glimmer/ember syntax specials:
That's it =)