mrmiguu / coco

Golang WebAssembly Framework
MIT License
110 stars 4 forks source link

Allow embedding of HTML templates #13

Open mrmiguu opened 5 years ago

mrmiguu commented 5 years ago

Give developers the option to embed raw string literal HTML templates in their components as an alternative to having the markup separate in another file (e.g. App.html).

This will improve developer context switching (see Ui as Code section), or at least give developers the option if they want to write their Ui this React/Vue-way.

image

This will also utilize VSCode's Go extension down the road for when it allows highlighting of HTML inside raw string literals.

(I tried this and this, but so far neither utilize VSCode's HTML language server. The first one highlights correctly (which is the most ideal) but renders everything else as plaintext. The second one is a butchered highlighting of the current Go syntax, but at least recognizes template tags.)