The Route path string type.
The Route config
for this element.
A class constructor decorator.
Associate a Route config
to a Component:
import { Component, Route } from '@sgrud/shell';
import { ChildComponent } from './child-component';
@Route({
path: 'example',
children: [
ChildComponent
]
})
@Component('example-element')
export class ExampleComponent extends HTMLElement implements Component {}
Generated using TypeDoc
Class decorator factory. Applying the Route decorator to a custom element will associate the supplied
config
with the decorated element constructor. Further, theconfig
ured children are iterated over and every child that is a custom element itself will be replaced by its respective route configuration or ignored, if no configuration was associated with the child. Finally, the processedconfig
is added to the Router.