:metal: KnockoutJS Goodies Monorepo
Register components only for the life of the page (unregister before dispose).
Allows breaking views into multiple components while helping to avoid naming conflicts.
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 {}