Skip to content

Commit

Permalink
Tidy up blazor examples (#160)
Browse files Browse the repository at this point in the history
* Removed branching in GreetingView.razor, demonstrated binding an attribute to an expression.

* Removed old non-functioning Razor sample

* Update README.md
  • Loading branch information
richbryant authored and glennawatson committed Jan 11, 2020
1 parent a654522 commit 9329fca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 20 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ Provides examples about [ReactiveUI routing](https://reactiveui.net/docs/handboo

<img width="400" src="https://i.gyazo.com/b5356b350c3ce2084f50d9ba534343a8.gif">

## Razor
## Blazor

#### [ReactiveUI.RazorExample](https://github.com/reactiveui/ReactiveUI.Samples/tree/master/razor)
#### [ReactiveUI.RazorExample](https://github.com/reactiveui/ReactiveUI.Samples/tree/master/blazor)

Building a web app with ReactiveUI and Razor Components.

<img width="500" src="https://i.gyazo.com/8bd953c633601e61c8a869631ba1d48e.gif">

Follow the [Razor Components tutorial](https://docs.microsoft.com/en-us/aspnet/core/razor-components/get-started?view=aspnetcore-3.0&tabs=visual-studio) on MSDN to get started. Heavily based on [@akourbat's work](https://github.com/akourbat/SampleRazorComponentsApp).
Follow the [Blazor tutorial](https://docs.microsoft.com/en-us/aspnet/core/tutorials/build-your-first-blazor-app?view=aspnetcore-3.1&tabs=visual-studio) on MSDN to get started. Heavily based on [@akourbat's work](https://github.com/akourbat/SampleRazorComponentsApp).

## More Avalonia samples

Expand Down
22 changes: 5 additions & 17 deletions blazor/ReactiveUI.BlazorExample/Views/GreetingView.razor
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,11 @@
class="form-text text-muted">
Please, enter your name.
</small>
@{
if (!ViewModel.CanClear)
{
<button class="btn btn-info"
disabled
@onclick="Clear">
Clear
</button>
}
else
{
<button class="btn btn-info"
@onclick="Clear">
Clear
</button>
}
}
<button class="btn btn-info"
disabled="@(!ViewModel.CanClear)"
@onclick="Clear">
Clear
</button>
</div>
</div>
</div>
Expand Down

0 comments on commit 9329fca

Please sign in to comment.