Skip to content

Commit

Permalink
use inner component
Browse files Browse the repository at this point in the history
  • Loading branch information
christiannagel committed Apr 20, 2018
1 parent 87d5e08 commit caca1f2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

@functions {

public string Title { get; set; }
public string Title { get; set; }
public string Publisher { get; set; }
public async void OnAddBook()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
<button onclick="@IncrementCount">Click me</button>

@functions {
public int IncrementBy { get; set; } = 1;

int currentCount = 0;

void IncrementCount()
{
currentCount++;
currentCount += IncrementBy;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
Welcome to your new app.

<SurveyPrompt Title="How is Blazor working for you?" />

<Counter IncrementBy="3"></Counter>

0 comments on commit caca1f2

Please sign in to comment.