To install this library, run:
$ npm install ngx-better-tooltip --save
There are three directuves you must use toottip-wrapper
, toottip-target
, and toottip-content
. See below
From your Angular AppModule
:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
// Import your library
import { SampleModule } from 'ngx-better-tooltip';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
TooltipModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
<tooltip-wrapper direction="right">
<tooltip-content>
Bye
</tooltip-content>
<tooltip-target>
Hi
</tooltip-target>
</tooltip-wrapper>
All available options are:
- color: background color
- display: css diplay mode of the host, defaults to
inline-block
- direction: defaults to
top
- toggle: weather of not the tooltip is toggled on click or on mouseover
MIT © Daniel Whitney