2.0.1 • Published 5 years ago

pa-au-md-tooltip v2.0.1

Weekly downloads
1
License
UNLICENSED
Repository
-
Last release
5 years ago

pa-au-md-tooltip (usable but still under construction)

This project is bootstrapped by aurelia-cli.

This Aurelia plugin project has a built-in dev app (with CLI built-in bundler and RequireJS) to simplify development.

  1. The local src/ folder, is the source code for the plugin.
  2. The local dev-app/ folder, is the code for the dev app, just like a normal app bootstrapped by aurelia-cli.
  3. You can use normal au run and au test in development just like developing an app.
  4. You can use aurelia-testing to test your plugin, just like developing an app.
  5. To ensure compatibility to other apps, always use PLATFORM.moduleName() wrapper in files inside src/. You don't need to use the wrapper in dev-app/ folder as CLI built-in bundler supports module name without the wrapper.

Note aurelia-cli doesn't provide a plugin skeleton with Webpack setup (not yet), but this plugin can be consumed by any app using Webpack, or CLI built-in bundler, or jspm.

Description

This package is an aurelia plugin for having tooltip (title) over HTML elements. The Tooltip.js library is used as the core of this plugin and all of its options and abilities will be accessible through this plugin.

Install the package in your project

At first you need to do a npm install --save pa-au-md-tooltip in the root direcotry to have plugin installed in your project. Then it will be added into your dependencies (package.json file) and will be installed in your node-modules.

Plugin registration within your app

In your app, open the file main.js and add the line .plugin(PLATFORM.moduleName('pa-au-md-tooltip')); to it, so the result should be like below:

import {PLATFORM} from 'aurelia-pal';

export function configure(aurelia) {
  aurelia.use
    .standardConfiguration()
    .feature(PLATFORM.moduleName('resources/index'))
    .plugin(PLATFORM.moduleName('pa-au-md-tooltip'));

  aurelia.start().then(() => aurelia.setRoot(PLATFORM.moduleName('app')));
}

Enjoy using tooltip

Now as you have installed the package and imported the plugin, you can use it. In any component of your current project, try using pa-au-md-tooltip just as simple as below:

<!-- <span pa-au-md-tooltip="this is a tooltip">Hover Me!</span> --> <!-- This type of usage requires some improvements in aurelia-framework which are issued -->
<span pa-au-md-tooltip="title.bind: myTitle;">Hover Me!</span>
<span pa-au-md-tooltip="title.bind: myTitle; position: top;">Hover Me!</span>

Run dev app

Run au run, then open http://localhost:9000

To open browser automatically, do au run --open.

To change dev server port, do au run --port 8888.

To install new npm packages automatically, do au run --auto-install

Unit tests

Run au test (or au karma).

To run in watch mode, au test --watch or au karma --watch.

2.0.1

5 years ago

2.0.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago