You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aspnetcore/get-started.md
+10-12Lines changed: 10 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ Obtain and install the latest .NET SDK at [Download .NET](https://dotnet.microso
30
30
31
31
## Create a web app project
32
32
33
-
Open a command shell to a suitable location for the sample app and enter the following command to create a Blazor Web App. The `-o|--output` option creates a folder for the project and names the project `BlazorSample`:
33
+
Open a command shell to a suitable location for the sample app and use the following command to create a Blazor Web App. The `-o|--output` option creates a folder for the project and names the project `BlazorSample`:
34
34
35
35
```dotnetcli
36
36
dotnet new blazor -o BlazorSample
@@ -44,27 +44,25 @@ Change the directory to the `BlazorSample` folder with the following command:
44
44
cd BlazorSample
45
45
```
46
46
47
-
Execute the following command to run the app:
47
+
The `dotnet watch` command runs the app and opens your default browser to the app's landing page:
48
48
49
49
```dotnetcli
50
50
dotnet watch
51
51
```
52
52
53
-
The `dotnet watch` command runs the app and opens your default browser to the app's landing page.
53
+
The browser opens to the app's home page.
54
54
55
-
The browser shows the app's home page.
56
-
57
-
Using the app's sidebar navigation, visit the Counter page, where you can select the **:::no-loc text="Click me":::** button to increment the counter. Visit the Weather page to see a page load weather data.
55
+
Using the app's sidebar navigation, visit the Counter page, where you can select the **:::no-loc text="Click me":::** button to increment the counter.
58
56
59
57
## Edit a Razor component
60
58
61
-
Leave the browser open with the app loaded. By using the `dotnet watch` command to run the app, you can make changes to the app's markup and code and see the changes immediately reflected in the browser.
59
+
Leave the browser open with the Counter page loaded. By using the `dotnet watch` command to run the app, you can make changes to the app's markup and code and see the changes immediately reflected in the browser.
62
60
63
61
The `Counter` Razor component that renders the Counter web page is located at `Components/Pages/Counter.razor` in the project.
64
62
65
-
Open the `Counter.razor` file in a text editor and note a few interesting lines that render content and make the component's counter feature work:
63
+
Open the `Counter.razor` file in a text editor and note a few interesting lines that render content and make the component's counter feature work.
66
64
67
-
The component starts with a line that indicates the component's relative path (`/counter`):
65
+
The file starts with a line that indicates the component's relative path (`/counter`):
68
66
69
67
```razor
70
68
@page "/counter"
@@ -76,7 +74,7 @@ The title of the page is set by `<PageTitle>` tags:
76
74
<PageTitle>Counter</PageTitle>
77
75
```
78
76
79
-
An H1 heading is displayed:
77
+
An H1 heading is displayed to the user:
80
78
81
79
```razor
82
80
<h1>Counter</h1>
@@ -88,7 +86,7 @@ A paragraph element (`<p>`) displays the current count, which is stored in a var
88
86
<p role="status">Current count: @currentCount</p>
89
87
```
90
88
91
-
A button (`<button>`) allows the user to call a C# method named `IncrementCount` when the button is selected:
89
+
A button (`<button>`) allows the user to increment the counter, which occurs when the button click executes a C# method named `IncrementCount`:
@@ -127,7 +125,7 @@ Change the line so that `currentCount` is incremented by a value of ten each tim
127
125
128
126
Save the file.
129
127
130
-
As soon as you save the file, the running app is updated automatically because you used the `dotnet watch` command to run the app. Go back to the app in the browser with the Counter page loaded and select the **:::no-loc text="Click me":::** button. Witness how the counter now increments by ten.
128
+
As soon as you save the file, the running app is updated automatically because you used the `dotnet watch` command. Go back to the app in the browser with the Counter page loaded and select the **:::no-loc text="Click me":::** button. Witness how the counter now increments by ten.
0 commit comments