1
我創建了一個自定義屬性,是引導提示的包裝奧裏利亞customAttribute多個屬性傳遞
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>
所以,問題是如何我將數據放置和數據原始圖塊傳遞並綁定到Tooltip
類中的標題和佈局。目前的aurelia documentation沒有提到有關自定義屬性的多個數據綁定的任何內容。