@@ -19,38 +19,50 @@ Blazouter is a comprehensive routing library for Blazor applications, available
1919- Tested and verified working
2020- Full hierarchical route structure support
2121- Example: ` /users ` (parent) → ` /users/:id ` (child)
22+ - Unlimited nesting depth for complex route hierarchies
2223- Parent routes with child routes using ` RouterOutlet ` component
2324
2425### ✅ 2. Route Guards (Protected Routes)
2526- Tested and verified working
2627- ` CanActivateAsync ` method to control route access
2728- Example: ` SampleAuthGuard ` in the sample application
2829- ` GetRedirectPathAsync ` for redirect on denied access
30+ - Support for multiple guards per route (executed in order)
2931- ` IRouteGuard ` interface for custom authentication/authorization logic
32+ - Guards can be registered via dependency injection or created via Activator
3033
3134### ✅ 3. Lazy Loading
3235- Reduces initial bundle size
3336- Tested and verified working
3437- Async component loading with ` Task<Type> `
3538- Example: Lazy page with simulated 1-second delay
3639- ` ComponentLoader ` function property on ` RouteConfig `
40+ - Loading state support with ` <Loading> ` parameter in Router
41+ - Component caching after first load for performance
3742
3843### ✅ 4. Route Transitions/Animations
3944- Tested and verified working
45+ - 14 built-in transition types
4046- Custom animations can be added via CSS
4147- Configurable per-route via ` Transition ` property
4248- Automatic animation application on route change
49+ - GPU-accelerated animations for smooth performance
50+ - Respects prefers-reduced-motion accessibility preference
4351- Built-in transitions: ` None ` , ` Pop ` , ` Blur ` , ` Fade ` , ` Flip ` , ` Lift ` , ` Scale ` , ` Slide ` , ` Swipe ` , ` Reveal ` , ` Rotate ` , ` Curtain ` , ` SlideUp ` , ` SlideFade ` , ` Spotlight `
4452
4553### ✅ 5. Programmatic Navigation
4654- Query parameter support
55+ - Browser history integration
4756- Tested and verified working
4857- ` NavigateTo(path) ` method
58+ - Support for relative and absolute navigation
4959- Integration with Blazor's ` NavigationManager `
5060- ` RouterNavigationService ` for imperative navigation
5161
5262### ✅ 6. Dynamic Route Parameters
5363- Tested and verified working
64+ - Parameter change notifications
65+ - Type-safe parameter extraction
5466- Query string parameter support
5567- Support for nested route parameters
5668- Path parameters using ` :paramName ` syntax
@@ -60,18 +72,42 @@ Blazouter is a comprehensive routing library for Blazor applications, available
6072- ` Exact ` matching option
6173- Tested and verified working
6274- Visual feedback for current route
75+ - Supports nested route active states
76+ - Automatic update on route changes
6377- ` ActiveClass ` property for custom styling
6478- ` RouterLink ` component with automatic active class
6579
6680### ✅ 8. Layout System
6781- Tested and verified working
82+ - Layout state preservation during navigation
6883- Seamless layout switching during navigation
6984- Support for no-layout routes by setting Layout to null
7085- ` RouteConfig.Layout ` property for route-specific layouts
7186- ` Router.DefaultLayout ` parameter for application-wide layout
7287- Layout priority: Route.Layout > Router.DefaultLayout > No Layout
7388- Automatic layout wrapping using @Body from LayoutComponentBase
7489
90+ ### ✅ 9. Attribute-Based Routing
91+ - Tested and verified working
92+ - Mix programmatic and attribute-based routes
93+ - Declarative route configuration using attributes
94+ - Full documentation in [ ATTRIBUTE_ROUTING.md] ( https://github.com/Taiizor/Blazouter/blob/develop/ATTRIBUTE_ROUTING.md )
95+ - Automatic route discovery via assembly scanning
96+ - ` AddAttributeRoutes() ` extension for easy integration
97+ - ` FromAttributes() ` for pure attribute-based configuration
98+ - 8 attribute types: ` [Route] ` , ` [RouteGuard] ` , ` [RouteTransition] ` , ` [RouteLayout] ` , ` [RouteTitle] ` , ` [RouteData] ` , ` [RouteRedirect] ` , ` [RouteExact] `
99+
100+ ### ✅ 10. Error Handling
101+ - Error event notifications
102+ - Comprehensive error handling system
103+ - Retry mechanism for failed operations
104+ - ` DefaultRouterErrorHandler ` with built-in logging
105+ - ` RouterErrorContext ` with detailed error information
106+ - ` ErrorContent ` parameter in Router for custom error UI
107+ - ` IRouterErrorHandler ` interface for custom error handlers
108+ - Custom error handler registration via ` AddBlazouterErrorHandler<T>() `
109+ - Error types: ` ComponentLoadFailed ` , ` GuardRejected ` , ` NavigationFailed ` , ` InvalidRoute `
110+
75111## Components
76112
77113### Router
@@ -98,47 +134,78 @@ Nested route renderer that:
98134
99135## Services
100136
101- ### RouteMatcherService
102- - Query string parsing
103- - Nested route matching
104- - Pattern matching for routes
105- - Dynamic parameter extraction
137+ ### RouteMatcherService (IRouteMatcherService)
138+ - Registered as scoped service
139+ - Route priority and exact match handling
140+ - Dynamic parameter extraction from URL paths
141+ - Query string parsing and parameter extraction
142+ - Pattern matching for routes with wildcard support
143+ - Nested route matching with parent-child relationships
106144
107145### RouterStateService
108- - Parameter access
109- - Event notifications
110- - Current route tracking
111- - Central state management
146+ - Query parameter retrieval
147+ - Registered as scoped service
148+ - Component lifecycle integration
149+ - Event notifications for route changes
150+ - Current route tracking with RouteMatch
151+ - Parameter access via GetParam(key) method
152+ - Central state management for routing context
112153
113154### RouterNavigationService
114- - Query parameter handling
115- - Programmatic navigation API
116- - Wrapper around NavigationManager
155+ - Browser history integration
156+ - Registered as scoped service
157+ - Support for relative and absolute navigation
158+ - Query parameter handling and URL building
159+ - Programmatic navigation API with NavigateTo(path)
160+ - Wrapper around NavigationManager for enhanced functionality
161+
162+ ### RouteAttributeDiscoveryService
163+ - Supports all 8 route attributes
164+ - Reflection-based with trimming warnings
165+ - Converts attributes to RouteConfig objects
166+ - Static service for route discovery at startup
167+ - Discovers components with [ Route] attribute
168+ - Assembly scanning for attribute-based routes
169+
170+ ### IRouterErrorHandler / DefaultRouterErrorHandler
171+ - Error type categorization
172+ - Retry mechanism support
173+ - Default handler with console logging
174+ - Error context with detailed information
175+ - Error handling interface for custom implementations
176+ - Registered as scoped service via AddBlazouterErrorHandler<T >()
117177
118178## Configuration
119179
120180### RouteConfig Properties
121- - ` RedirectTo ` : Redirect path
122- - ` Data ` : Custom data dictionary
123- - ` Transition ` : Animation name
124- - ` Title ` : Route title for metadata
125- - ` Exact ` : Exact path matching flag
126- - ` Guards ` : List of route guard types
127- - ` Path ` : Route pattern (e.g., "/users/: id ")
128- - ` Children ` : Nested route configurations
129- - ` Component ` : Component type to render
130- - ` Layout ` : Layout component type (overrides DefaultLayout)
131- - ` ComponentLoader ` : Async component loader for lazy loading
181+ - ` Exact ` : Exact path matching flag - When true, requires exact URL match
182+ - ` Data ` : Custom data dictionary - Arbitrary metadata passed to components
183+ - ` Transition ` : Animation type - One of 14 built-in RouteTransition enum values
184+ - ` HasExplicitLayout ` : Internal flag - Tracks if Layout was explicitly set (even if null)
185+ - ` Layout ` : Layout component type - Overrides DefaultLayout, set to null for no layout
186+ - ` Path ` : Route pattern (e.g., "/users/: id ") - Supports dynamic parameters with ` : ` prefix
187+ - ` Title ` : Route title for metadata - Used for page title, breadcrumbs, or navigation labels
188+ - ` Children ` : Nested route configurations - List of child RouteConfig for hierarchical routing
189+ - ` RedirectTo ` : Redirect path - Automatically redirects to specified path when route matches
190+ - ` Guards ` : List of route guard types - Array of IRouteGuard implementations for access control
191+ - ` Component ` : Component type to render - Direct component reference for immediate loading
192+ - ` ComponentLoader ` : Async component loader for lazy loading - Returns ` Task<Type> ` for on-demand loading
132193
133194## Package-Specific Features
134195
135196### Blazouter (Core)
136- - Navigation services
137- - Lazy loading support
138- - Route guards interface
139- - Route configuration and matching
140- - Multi-framework support (net6.0-net10.0 )
197+ - Lazy loading support with ComponentLoader
198+ - 14 transition types with RouteTransition enum
199+ - Comprehensive XML documentation for IntelliSense
200+ - Layout system support (DefaultLayout, per-route Layout)
201+ - CSS animations included (blazouter.css, blazouter.min.css )
141202- All routing components (Router, RouterLink, RouterOutlet)
203+ - Multi-framework support (net6.0, net7.0, net8.0, net9.0, net10.0)
204+ - Navigation services (RouterNavigationService, RouterStateService)
205+ - Route guards interface (IRouteGuard, AuthGuard base implementation)
206+ - Route configuration and matching (RouteConfig, RouteMatcherService)
207+ - Attribute-based routing (RouteAttributeDiscoveryService, 8 route attributes)
208+ - Error handling (IRouterErrorHandler, DefaultRouterErrorHandler, RouterErrorContext)
142209
143210### Blazouter.Server
144211- Server-side route optimization
@@ -174,11 +241,13 @@ All features are interactive and can be tested by navigating through the applica
174241
175242| Feature | Traditional Blazor | Blazouter |
176243| ---------| -------------------| -----------|
177- | Transitions | ❌ None | ✅ Built-in |
178- | Active Links | ⚠️ Manual | ✅ Automatic |
179- | Lazy Loading | ⚠️ Limited | ✅ Full support |
180- | Route Guards | ❌ Manual | ✅ Built-in |
181- | Nested Routes | ❌ Limited | ✅ Full support |
182- | Parameter Access | ✅ Basic | ✅ Enhanced |
183- | Programmatic Nav | ✅ Basic | ✅ Enhanced |
184- | Layout System | ⚠️ Static @layout | ✅ Dynamic per-route |
244+ | Transitions | ❌ None | ✅ 14 built-in transitions |
245+ | Active Links | ⚠️ Manual | ✅ Automatic with RouterLink |
246+ | Lazy Loading | ⚠️ Limited | ✅ Full support with ComponentLoader |
247+ | Route Guards | ❌ Manual | ✅ Built-in IRouteGuard interface |
248+ | Layout System | ⚠️ Static @layout | ✅ Dynamic per-route with priority |
249+ | Error Handling | ❌ Manual | ✅ Built-in with IRouterErrorHandler |
250+ | Nested Routes | ❌ Limited | ✅ Unlimited nesting depth |
251+ | Attribute Routes | ❌ @page only | ✅ 8 attribute types with full config |
252+ | Parameter Access | ✅ Basic | ✅ Enhanced with RouterStateService |
253+ | Programmatic Nav | ✅ Basic | ✅ Enhanced with RouterNavigationService |
0 commit comments