From 7656978acafd2bf81a12c085d24a6ca95224ab04 Mon Sep 17 00:00:00 2001 From: Daniel Mendie <66223776+danielmendie@users.noreply.github.com> Date: Sat, 27 Jan 2024 14:22:08 +0100 Subject: [PATCH] Update README.md --- README.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9e0d9f2..4c7edea 100644 --- a/README.md +++ b/README.md @@ -12,20 +12,20 @@ To begin, install the **Mendi.Blazor.DynamicNavigation** Nuget package from Visual Studio or use the CLI: `dotnet add package Mendi.Blazor.DynamicNavigation` - ## 🔧Configuration + Open your project's **Program.cs** file and replace this section ```await builder.RunAsync()``` with ```csharp var app = await builder.UseDynamicNavigator(); await app.RunAsync(); ``` + Now create a `BaseComponent.cs` class in the pages folder or wherever it would be convenient for you. You can change the `BaseComponent.cs` name of course. You'll have to inherit the `DynamicNavigatorComponentBase` class and add the `NavigatorBaseComponent` attribute. Your class should look similar to this: ```csharp using Mendi.Blazor.DynamicNavigation; using Mendi.Blazor.DynamicNavigation.Common; - namespace Test.Pages; [NavigatorBaseComponent] public class BaseComponent : DynamicNavigatorComponentBase @@ -33,7 +33,21 @@ public class BaseComponent : DynamicNavigatorComponentBase } ``` -The `NavigatorBaseComponent` attribute should be specified on the class acting as your component base class - **Important** +The `NavigatorBaseComponent` attribute should be specified on the class acting as your component base class **This is very important** + +Open the `_Imports.razor` file and add the following lines of code +``` csharp +@using Mendi.Blazor.DynamicNavigation +@inherits BaseComponent +``` +BaseComponent - This should be the name of your base component class(however you had called it) + +After that, add the **BlazorDynamicPageNavigator** component to the Home.razor or Index.razor file `` + +## 🚀Using It + + +