The View
Views are everything users can see and interact with. In DotVVM, views are written in DotHTML, a flavour of HTML.
You can see two obvious differences from plain HTML:
the line starting with
@viewModelis the ViewModel Directive. It tells DotVVM which ViewModel belongs to the page, andvalue binding expressions that bind ViewModel properties to specific places in the View:
<p>{{value: Result}}</p>
When the user loads the page, the value of the Result property will displayed inside the <p> element. Whenever the value of the property in the viewmodel changes, the text in the page gets updated.
Tasks
- Add a
<p>element inside the<body>. - Use a value binding to display value of the
Resultproperty inside of the<p>element.
| Message | Line | Column | |
|---|---|---|---|
|
|