@profiscience/knockout-contrib-router-plugins-components
TypeScript icon, indicating that this package has built-in type declarations

1.0.17 • Public • Published

router.plugins.components

Version Dependency Status Peer Dependency Status Dev Dependency Status Downloads

Register components only for the life of the page (unregister before dispose).

Allows breaking views into multiple components while helping to avoid naming conflicts.

Usage

import { Route, componentsRoutePlugin } from '@profiscience/knockout-contrib'

Route.usePlugin(componentsRoutePlugin)

new Route('/', {
  components: () => ({
    // will register the <toolbar></toolbar> component for use in this view and its children
    toolbar: import('./toolbar'),
  }),
})

toolbar.ts

export const template = 'Hello, World!'
export class viewModel {}

/@profiscience/knockout-contrib-router-plugins-components/

    Package Sidebar

    Install

    npm i @profiscience/knockout-contrib-router-plugins-components

    Weekly Downloads

    1

    Version

    1.0.17

    License

    WTFPL

    Unpacked Size

    27.1 kB

    Total Files

    12

    Last publish

    Collaborators

    • dorgeron
    • barsh