I have created a custom attribute which is a wrapper for bootstrap tooltip
tooltip.ts
import {bindable, inject, customAttribute} from "aurelia-framework";
import * as $ from "jquery";
@customAttribute("tooltip")
@inject(Element)
export class Tooltip {
element: HTMLElement;
@bindable title: any;
@bindable placement: any
constructor(element) {
this.element = element;
}
attached() {
$('[data-toggle="tooltip"]').tooltip();
}
}
header.html
<a class="toggle-link" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Click to Search"><i class="fa fa-search"></i></a>
So the question is how to I pass and bind data-placement and data-original-tile to title and placement in the Tooltip class. The current aurelia documentation doesn't say anything about multiple data binding for custom attributes.