@daffodil/external-router
v0.69.0
Published
A platform-agnostic package that connects the @angular/router with an external routing service (e.g. an API), allowing for runtime route resolution.
Downloads
368
Readme
@daffodil/external-router
Purpose
This package extends @angular/router
and allows you to render routes defined in external systems like Wordpress, Magento, Contentful, etc, as if you had defined the routes statically in your Angular Routes
. This is useful when you are trying to generate "user-friendly" routes in external applications and want to resolve them by their "user-friendly" uri, e.g. sweatshirts
instead of something like category/6
or category/sweatshirts
.
As an example scenario, you could:
- Define a page with a "user-friendly" url, e.g.
sweatshirts
in an external service like Magento - Use the
@daffodil/external-router/driver
to make calls to the Magento instance's URL Resolver - Navigate to
www.your-domain.com/sweatshirts
and render the appropriate components for the blog post.