├── src ├── assets │ └── .gitkeep ├── app │ ├── app.component.css │ ├── interactive-tooltip │ │ ├── interactive-tooltip.component.css │ │ ├── interactive-tooltip.component.ts │ │ └── interactive-tooltip.component.html │ ├── app.component.ts │ ├── showcase-button.component.ts │ ├── showcase-button.component.css │ ├── app.module.ts │ ├── tooltip.directive.ts │ └── app.component.html ├── favicon.ico ├── environments │ ├── environment.prod.ts │ └── environment.ts ├── styles.css ├── typings.d.ts ├── tsconfig.app.json ├── index.html ├── main.ts ├── tsconfig.spec.json ├── test.ts └── polyfills.ts ├── e2e ├── tsconfig.e2e.json ├── app.po.ts └── app.e2e-spec.ts ├── .editorconfig ├── tsconfig.json ├── .gitignore ├── protractor.conf.js ├── README.md ├── karma.conf.js ├── package.json ├── .angular-cli.json └── tslint.json /src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/app.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/interactive-tooltip/interactive-tooltip.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alexurquhart/ng-tippy/master/src/favicon.ico -------------------------------------------------------------------------------- /src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | 3 | -------------------------------------------------------------------------------- /src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* SystemJS module definition */ 2 | declare var module: NodeModule; 3 | interface NodeModule { 4 | id: string; 5 | } 6 | 7 | declare var tippy: Function; -------------------------------------------------------------------------------- /e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/e2e", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "node" 10 | ] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /e2e/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class NgTippyPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getParagraphText() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "es2015", 6 | "baseUrl": "", 7 | "types": [] 8 | }, 9 | "exclude": [ 10 | "test.ts", 11 | "**/*.spec.ts" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |Installation
156 |164 | ng-tippy is not yet provided as an Angular 4 module. The steps to install it in an Angular-CLI application are follows: 165 |
166 |Using npm install Tippy.js
167 |$ npm i --save tippy.js
168 |
169 | Add Tippy.js and Tippy.css to your .angular-cli.json
171 | ...
172 | "styles": [
173 | "styles.css",
174 | "../node_modules/tippy.js/dist/tippy.css"
175 | ],
176 | "scripts": [
177 | "../node_modules/tippy.js/dist/tippy.js"
178 | ],
179 | ...
180 |
181 |
182 | Add a type declaration Tippy in typings.d.ts
declare var tippy: Function;
185 |
186 | Next, you will need to
187 | download tooltip.directive.ts and import/declare it in your app.module.ts
188 |
191 | ...
192 | import { TooltipDirective } from 'app/tooltip.directive';
193 |
194 | @NgModule({
195 | declarations: [
196 | AppComponent,
197 | TooltipDirective,
198 | ],
199 | ...
200 |
201 | Usage
209 |