Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
tooltip example custom attribute
import {customAttribute, inject, bindable} from 'aurelia-framework';
import $ from 'bootstrap';
@customAttribute('tooltip')
@inject(Element)
export class Tooltip {
element: HTMLElement;
@bindable title: any;
@bindable placement: any;
constructor(element) {
this.element = element;
}
attached() {
$(this.element).tooltip({
title:this.title,
placement:this.placement
});
}
}
<template>
<require from="./tooltip"></require>
<a class="btn btn-default" data-toggle="tooltip" tooltip="placement:top; title: details">
<i class="fa fa-list-alt"></i> details
</a>
</template>
@mikhailkopev

This comment has been minimized.

Copy link

mikhailkopev commented Jun 19, 2019

Would you tell me why am I getting the error: "bootstrap_1.default is not a function"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.