The listener that is used for the interceptor.
The controller of the component.
The element of the component.
The original value of the href attribute.
The resolved path that the element links to.
This static property lets you define listeners that will be executed whenproperties of the component change.
It should be a map where the keys are paths that should be watched on the component andthe values are names of methods that will be invoked on the component instance.
In the following example you can see a component that reacts to changesin the size of the defining element.
export default class MyComponent extends Component { static inject: {element: Element}; static bindings = { 'element.clientHeight': 'heightChange' }; width: number; heightChange(height: number) { this.width = height * 2; }}
This static property defines which properties of the componentshould be available in its local scope which will be used by thecomponent's behaviors as well as by the defining element's children.
Values of this array represent the name of one of the component'sproperties that will be pushed to the local scope.
export default class MyComponent extends Component { static locals = ['firstName', 'lastName'];}
When a string is given it must contain the html of the component's template.
In general you should not make use of this at all. Your template should bein a separate file with the same name and in the same folder as your component'sTypeScript file. This feature is only for advanced usage (for example having an emptytemplate by setting this to an empty string) or rapid prototyping.
Initializes the click event that intercepts the default behaviorbut makes sure routing is active first.
The Anchor component automatically handles anchor tags tomake them properly work with routing and still keep theirusual behavior.
{ default } from mahalo/components/anchor