From 58cc946a88fe948d36c7987310dca5cea99fb296 Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Mon, 19 Mar 2018 13:18:42 +0000 Subject: [PATCH] Update templates to use new @page routing feature --- .../BlazorHosted.CSharp.Client/App.cshtml | 5 ++--- .../BlazorHosted.CSharp.Client/Pages/Counter.cshtml | 3 ++- .../BlazorHosted.CSharp.Client/Pages/FetchData.cshtml | 1 + .../BlazorHosted.CSharp.Client/Pages/Index.cshtml | 3 ++- .../content/BlazorStandalone.CSharp/App.cshtml | 5 ++--- .../content/BlazorStandalone.CSharp/Pages/Counter.cshtml | 3 ++- .../content/BlazorStandalone.CSharp/Pages/FetchData.cshtml | 3 ++- .../content/BlazorStandalone.CSharp/Pages/Index.cshtml | 3 ++- 8 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/App.cshtml b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/App.cshtml index 0618d02adb..59be8326e1 100644 --- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/App.cshtml +++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/App.cshtml @@ -1,6 +1,5 @@  - + diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/Pages/Counter.cshtml b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/Pages/Counter.cshtml index 88367f46fa..3677204440 100644 --- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/Pages/Counter.cshtml +++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/Pages/Counter.cshtml @@ -1,4 +1,5 @@ -

Counter

+@page "/counter" +

Counter

Current count: @currentCount

diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/Pages/FetchData.cshtml b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/Pages/FetchData.cshtml index 86eecd2911..3e93b74450 100644 --- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/Pages/FetchData.cshtml +++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/Pages/FetchData.cshtml @@ -1,4 +1,5 @@ @using BlazorHosted.CSharp.Shared +@page "/fetchdata" @inject HttpClient Http

Weather forecast

diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/Pages/Index.cshtml b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/Pages/Index.cshtml index f75a462181..86eb281395 100644 --- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/Pages/Index.cshtml +++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/Pages/Index.cshtml @@ -1,3 +1,4 @@ -

Hello, world!

+@page "/" +

Hello, world!

Welcome to your new app. diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/App.cshtml b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/App.cshtml index 78267a4bf4..59be8326e1 100644 --- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/App.cshtml +++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/App.cshtml @@ -1,6 +1,5 @@  - + diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Pages/Counter.cshtml b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Pages/Counter.cshtml index 88367f46fa..3677204440 100644 --- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Pages/Counter.cshtml +++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Pages/Counter.cshtml @@ -1,4 +1,5 @@ -

Counter

+@page "/counter" +

Counter

Current count: @currentCount

diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Pages/FetchData.cshtml b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Pages/FetchData.cshtml index 4c65fb0c2a..4c87bda9f6 100644 --- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Pages/FetchData.cshtml +++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Pages/FetchData.cshtml @@ -1,4 +1,5 @@ -@inject HttpClient Http +@page "/fetchdata" +@inject HttpClient Http

Weather forecast

diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Pages/Index.cshtml b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Pages/Index.cshtml index f75a462181..86eb281395 100644 --- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Pages/Index.cshtml +++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Pages/Index.cshtml @@ -1,3 +1,4 @@ -

Hello, world!

+@page "/" +

Hello, world!

Welcome to your new app.