Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4a165d0
Support URI syntax characters (#35)
stefan505 May 2, 2024
c47efe8
Expand path regex (#37)
stefan505 May 3, 2024
fd84709
Support URI syntax characters (#35) (#36)
stefan505 May 2, 2024
d9adffc
Merge branch 'main' into develop
stefan505 May 3, 2024
d24e5e5
Fix memory leak caused by not removing animationend event listener (#41)
jn42lm1 Aug 4, 2024
0988ded
Bump braces from 3.0.2 to 3.0.3 (#40)
dependabot[bot] Aug 4, 2024
a3d1d31
Bump ws from 7.5.9 to 7.5.10 in /examples/vanilla (#39)
dependabot[bot] Aug 4, 2024
33a325a
Updated docs
jn42lm1 Aug 4, 2024
dc1d6cf
Bump ws from 7.5.9 to 7.5.10 in /examples/lit (#43)
dependabot[bot] Aug 4, 2024
9c790b6
Bump braces from 3.0.2 to 3.0.3 in /examples/vanilla (#42)
dependabot[bot] Aug 4, 2024
411a3ed
Updated docs
jn42lm1 Aug 4, 2024
fe4e2e7
Merge branch 'main' into develop
jn42lm1 Aug 4, 2024
7a1001d
Fix memory leak (#44) (#45)
jn42lm1 Aug 4, 2024
aa9cc8a
Add option to cache route component templates (#46)
jn42lm1 Aug 25, 2024
1cc8566
Update cache loader to be safe in case the cached component has been …
jn42lm1 Aug 26, 2024
2a93ace
Bump braces from 3.0.2 to 3.0.3 in /examples/lit (#47)
dependabot[bot] Aug 26, 2024
63bde2e
Updated docs
jn42lm1 Aug 26, 2024
ec35976
Merge branch 'main' into develop
jn42lm1 Aug 26, 2024
81c9271
Add Cache Route Option (#48) (#49)
jn42lm1 Aug 26, 2024
70aa7ac
Light DOM Theming
jn42lm1 Jan 9, 2025
d821a34
Bump rollup and @web/dev-server in /examples/vanilla (#50)
dependabot[bot] Jan 9, 2025
601c774
Updated docs
jn42lm1 Jan 9, 2025
ad650b8
Bump rollup from 2.79.1 to 2.79.2 in /examples/vanilla (#51)
dependabot[bot] Jan 9, 2025
3c5bb63
Merge branch 'main' into develop
jn42lm1 Jan 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,10 @@ The ```Route``` object contains the following properties:
| **tag** | string | Optional, the registered custom-element tag name for your page web component, e.g. ```'view-login'``` |
| **path** | string | The relative URL path for the route to set in the browser navigation bar, e.g. ```'/login'``` |
| **title** | string | The window title to show when the route is loaded, e.g. ```'Login'``` |
| **animation** | string | Optional, animation to apply when loading the route. Can be one of ```fade```, ```slide```, ```pop```
| **cache** | boolean | Optional, indicator if the route template should be cached and reused, or recreated every time the route is navigated to.
| **animation** | string | Optional, animation to apply when loading the route. Can be one of ```fade```, ```slide```, ```pop``` |
| **theme** | string | Optional, CSS class name to attach to the route page when loading, useful to apply page level theme variables. Note the `dom="light"` attribute has to be set for this option to take effect. |
| **metadata** | object | Optional, metadata to store on the route. |
| **cache** | boolean | Optional, indicator if the route template should be cached and reused, or recreated every time the route is navigated to. |
| **load** | function | Optional, function to execute before navigating to the route. Typically used to lazy load the page web component, e.g. <br>```() => import('./views/ViewLogin')``` |
| **guard** | function | Optional, function to execute to check if a route may be navigated to. Typically used to limit access to routes., e.g. <br>```() => !this._isUserLoggedIn()``` |
| **isDefault** | boolean | Optional, flag to set this route as the default route to load when the browser URL path is empty or default, e.g. ```/```. Note: can only be applied to 1 route. |
Expand Down Expand Up @@ -310,6 +312,13 @@ The router styling can be customized using the following CSS Custom Properties:

### Router Tag

The ```<omni-router>``` tag exposes the following attributes:

| Function | Description |
| -------- | ----------- |
| ```dom="shadow"``` | Attached as shadow DOM to the router, preventing page level CSS from inheriting into the loaded route pages. This is the default. |
| ```dom="light"``` | Render the router in the parent element DOM, allowing for CSS values to inherit into the loaded route pages. |

The ```<omni-router>``` tag dispatches the following events, that may be useful to subscribe to when wanting to apply changes to a page while a route is lazy loading, e.g. show a loading indicator.

| Event | Description |
Expand Down
Loading
Loading