|
|
|
|
|
by daliwali
3274 days ago
|
|
Using class names was just an example, people may get the wrong impression that has anything to do with the variable name. It could have been made more explicit, but I wanted to be as terse as possible: <h1 class="name" data-bind="name"></h1>
It was also a design goal not to introduce a templating syntax, so `{{}}` brackets are out of the question. |
|
There are two downsides to this:
1) You have to define twice where the data is displayed. Once in the template and then again in the mapper.
2) <div>{{NAME}}</div> explicitly tells the reader "The name goes here". In your solution one would have to look it up in the mapper to be sure what goes where.