Update templates to use new @page routing feature

This commit is contained in:
Steve Sanderson 2018-03-19 13:18:42 +00:00
parent 139601894a
commit 58cc946a88
8 changed files with 15 additions and 11 deletions

View File

@ -1,6 +1,5 @@
<!-- <!--
Configuring this stuff here is temporary. Later we'll move the app config Configuring this here is temporary. Later we'll move the app config
into Program.cs, and it won't be necessary to specify AppAssembly. into Program.cs, and it won't be necessary to specify AppAssembly.
--> -->
<Router AppAssembly=typeof(Program).Assembly <Router AppAssembly=typeof(Program).Assembly />
PagesNamespace="BlazorHosted.CSharp.Client.Pages" />

View File

@ -1,4 +1,5 @@
<h1>Counter</h1> @page "/counter"
<h1>Counter</h1>
<p>Current count: @currentCount</p> <p>Current count: @currentCount</p>

View File

@ -1,4 +1,5 @@
@using BlazorHosted.CSharp.Shared @using BlazorHosted.CSharp.Shared
@page "/fetchdata"
@inject HttpClient Http @inject HttpClient Http
<h1>Weather forecast</h1> <h1>Weather forecast</h1>

View File

@ -1,3 +1,4 @@
<h1>Hello, world!</h1> @page "/"
<h1>Hello, world!</h1>
Welcome to your new app. Welcome to your new app.

View File

@ -1,6 +1,5 @@
<!-- <!--
Configuring this stuff here is temporary. Later we'll move the app config Configuring this here is temporary. Later we'll move the app config
into Program.cs, and it won't be necessary to specify AppAssembly. into Program.cs, and it won't be necessary to specify AppAssembly.
--> -->
<Router AppAssembly=typeof(Program).Assembly <Router AppAssembly=typeof(Program).Assembly />
PagesNamespace="BlazorStandalone.CSharp.Pages" />

View File

@ -1,4 +1,5 @@
<h1>Counter</h1> @page "/counter"
<h1>Counter</h1>
<p>Current count: @currentCount</p> <p>Current count: @currentCount</p>

View File

@ -1,4 +1,5 @@
@inject HttpClient Http @page "/fetchdata"
@inject HttpClient Http
<h1>Weather forecast</h1> <h1>Weather forecast</h1>

View File

@ -1,3 +1,4 @@
<h1>Hello, world!</h1> @page "/"
<h1>Hello, world!</h1>
Welcome to your new app. Welcome to your new app.