@daffodil/external-router
TypeScript icon, indicating that this package has built-in type declarations

0.78.0 • Public • Published

@daffodil/external-router

@daffodil/external-router 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.

Overview

It's useful when you are trying to generate "user-friendly" routes in external applications and want to resolve them by their "user-friendly" uri, like sweatshirts, instead of paths such as category/6 or category/sweatshirts.

Installation

To install @daffodil/external-router, use the following commands in your terminal.

Install with npm:

npm install @daffodil/external-router --save

Install with yarn:

yarn add @daffodil/external-router

Usage

As an example scenario, you could:

  1. Define a page with a "user-friendly" url, e.g. sweatshirts in an external service like Magento
  2. Use the @daffodil/external-router/driver to make calls to the Magento instance's URL Resolver
  3. Navigate to www.your-domain.com/sweatshirts and render the appropriate components for the blog post.

Readme

Keywords

none

Package Sidebar

Install

npm i @daffodil/external-router

Weekly Downloads

14

Version

0.78.0

License

MIT

Unpacked Size

333 kB

Total Files

181

Last publish

Collaborators

  • damienwebdev
  • griest