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

0.3.5 • Public • Published

Xeito - Harness the power of the web.

xeito-logo

Xeito is a typescript framework for building web applications

Xeito Documentation

Xeito on npm   License


Xeito Router

This is the Router library for Xeito Framework. Provides a simple yet powerful router for web applications built with Xeito.

To find the full documentation and more links go to the main README file.


Exports:

Classes:

  • XeitoRouterPlugin: The Router Plugin class, intented to be registered in a Xeito application.

Example:

import { Xeito } from '@xeito/core';
import { XeitoRouterPlugin } from '@xeito/router';
import { AppComponent } from './app-component.ts';

const app = new Xeito(AppComponent);
app.usePlugin(XeitoRouterPlugin, {
  routes: [
    {
      path: '/',
      component: HomeComponent,
    },
    {
      path: '/about',
      component: AboutComponent,
    },
  ],
});

app.bootstrap();

Components:

  • RouterSlot: The component that renders the current route component (and nested views).
  • RouterLink: Helper component to create links from the template.

Interfaces

  • Route: The interface for injectable metadata (decorator).
  • RouteGuard: The interface for route guards.
  • RouterOptions: The interface for the Router Plugin options (see example above).
  • XeitoRouter: The interface for the XeitoRouter global property

Package Sidebar

Install

npm i @xeito/router

Weekly Downloads

0

Version

0.3.5

License

MIT

Unpacked Size

34.1 kB

Total Files

5

Last publish

Collaborators

  • aerotoad