Description
ASP.NET Core Blazor layouts documentation said that:
Every folder of an app can optionally contain a template file named _Imports.razor. The compiler includes the directives specified in the imports file in all of the Razor templates in the same folder and recursively in all of its subfolders. Therefore, an _Imports.razor file containing
@layout DoctorWhoLayout
ensures that all of the components in a folder use theDoctorWhoLayout
component. There's no need to repeatedly add@layout DoctorWhoLayout
to all of the Razor components (.razor) within the folder and subfolders.
But is not working for the following admin folder and its subfolder. If I move the _Imports.razor
file inside Admin/Pages
folder then it works for the Components inside Admin/Pages
folder.
Even not working for the following folder structure:
If I go to the route of the components inside Admin
folder and its subfolder, the application freezes, and no error is thrown in the console.