Step17 NotFoundページのレイアウト指定が誤っている
cm-iwata opened this issue · comments
Step 17. タイトルヘッダの追加 - レイアウト
でNotFoundページを以下のように修正しています。
<NotFound>
<LayoutView DefaultLayout="typeof(MainLayout)">
<p>Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
こちらですが、指定するのはDefaultLayout
ではなくLayout
が正解ではないでしょうか?
DefaultLayout
を指定するとNotFoundページが表示できませんでした。
参考
https://docs.microsoft.com/ja-jp/aspnet/core/blazor/layouts?view=aspnetcore-3.1