Not really... template literals just do that for you
-
-
We don't pretend it's validator valid, but it's syntax valid and can be parsed by any standard compliant HTML parser.
-
It's of course HTML, but it's additional syntax that means conditionals and loops that isn't defined by HTML.
-
In other words, there might be some benefits to repurposing HTML syntax, but in spirit it's extraneous syntax just as {{
#if}} is. -
I think you are optimizing for parsers rather than humans. It behaving like HTML means not having to ramp up on a dsl.
-
I'd say the opposite! Cramming the syntax into HTML makes it harder for humans to know which is real HTML and which is a conditional/loop.
-
But either way, in both syntaxes you need to learn the syntax for conditionals and loops.
-
I like to keep conditionals and loops in real js whenever possible. Turns out there is already a syntax for both! :)
-
One of the benefits to having templates in the js is that you write more real js and less magic... imo
- 5 more replies
New conversation -
-
-
do you mean things v-bind, v-model, v-if, etc...are the exteaneous parts?
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Html-like
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.