Skip to content

Instantly share code, notes, and snippets.

@freshcutdevelopment
Last active July 3, 2019 05:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save freshcutdevelopment/62c51515db7efb9b6e12 to your computer and use it in GitHub Desktop.
Save freshcutdevelopment/62c51515db7efb9b6e12 to your computer and use it in GitHub Desktop.
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
Copy link

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