38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
@page "/"
|
|
|
|
<PageTitle>Salut</PageTitle>
|
|
|
|
<h1>Salut t'es ici c'est cool</h1>
|
|
@foreach(var widget in Widgets)
|
|
{
|
|
<DynamicComponent Type="widget"></DynamicComponent>
|
|
}
|
|
<div>
|
|
<h2>One way Data Binding</h2>
|
|
Employee First Name: <label>@Employee.FirstName</label>
|
|
Employee Last name: <label>@Employee.LastName</label>
|
|
</div>
|
|
<div>
|
|
<h2>One way data binding in form controls</h2>
|
|
Employee First Name:
|
|
<input type="text" value="@Employee.FirstName" />
|
|
Employee Last Name:
|
|
<input type="text" value="@Employee.LastName"/>
|
|
</div>
|
|
|
|
<div>
|
|
<h2>Two way data binding in form controls</h2>
|
|
Employee First Name:
|
|
<input type="text" @bind="@Employee.FirstName" />
|
|
Employee Last Name:
|
|
<input type="text" @bind="@Employee.LastName" />
|
|
</div>
|
|
<div>
|
|
<h2>Two way data binding in form controls on a different event</h2>
|
|
Employee First Name:
|
|
<input type="text" @bind-value="@Employee.FirstName" @bind-value:event="oninput" />
|
|
Employee Last Name:
|
|
<input type="text" @bind-value="@Employee.LastName" @bind-value:event="oninput" />
|
|
</div>
|
|
|
|
<button @onclick="ButtonClick" class="btn btn-primary">Click me</button> |