angular-phonetic
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

angular-phonetic

A simple component to aid in rendering ruby text.

See an example here: https://tyrantwave.github.io/angular-phonetic/

Installation

  • Install from npm:
npm install --save angular-phonetic

Importing to your application

Reference the directive in the main module:

import { AngularPhoneticModule } from 'angular-phonetic';

Then in your base module:

imports[
    AngularPhoneticModule,
]

Using in your application

Use the component, providing the phonetic guide:

<ng-phonetic phonetic="zhōng wén">中文</ng-phonetic>

Customisation

For browsers that don't support the <ruby> tag, the brackets used for the phonetic guide can be customised:

<ng-phonetic phonetic="にほんご" brackets="「」">日本語</ng-phonetic>

You can also specify no brackets if required:

<ng-phonetic phonetic="にほんご" brackets="">日本語</ng-phonetic>

Or use the same bracket on both sides:

<ng-phonetic phonetic="조선적" brackets="|">朝鮮的</ng-phonetic>

License

MIT

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i angular-phonetic

    Weekly Downloads

    1

    Version

    1.1.1

    License

    MIT

    Unpacked Size

    36.9 kB

    Total Files

    23

    Last publish

    Collaborators

    • tyrantwave