0.0.21 • Published 3 months ago

@gengotech/ngx-furigana v0.0.21

Weekly downloads
-
License
GPL-3.0-or-later
Repository
github
Last release
3 months ago

Furigana for Angular

An Angular component that intelligently displays Furigana.

example

<!-- Kana between Kanji -->
<furigana word="日の人" reading="ひのひと"></furigana>

<!-- Kana between Kanji -->
<furigana word="あの日の人" reading="あのひのひと"></furigana>

<!-- Trailing kana -->
<furigana word="対抗する" reading="たいこうする"></furigana>

<!-- Kanji between kana  -->
<furigana word="ぶん回す" reading="ぶんまわす"></furigana>

<!-- Full kana  -->
<furigana word="稲葉曇" reading="いなばくもり"></furigana>

<!-- Full kana  -->
<furigana word="日" reading="にち"></furigana>

It was built in order to display Japanese text and readings programatically from sources such as JMdict.

Installation

npm install @gengotech/ngx-furigana --save

Add NgxFuriganaModule to your app.module.ts imports:

import { NgxFuriganaModule } from '@gengotech/ngx-furigana';

@NgModule({
 
  imports: [
    NgxFuriganaModule
  ],
  
})

Usage

<furigana [word]="対抗する'" [reading]="'たいこうする'"></furigana>

example

As you can see, the "する" part is automatically ignored even if it is present in the reading.

It can also handle words where there's kana on both ends:

<furigana [word]="'ぶん回す'" [reading]="'ぶんまわす'"></furigana>

example

API

If any of the inputs are changed, the component will automatically re-render.

Inputs

NameTypeDefaultDescription
wordstringThe main word that will be displayed.
readingstringThe reading for the word.
showFuriganabooleantrueOptional switch to turn off furigana display.
0.0.21

3 months ago

0.0.20

8 months ago

0.0.19

8 months ago

0.0.18

8 months ago

0.0.17

8 months ago

0.0.16

8 months ago

0.0.15

9 months ago

0.0.14

9 months ago

0.0.13

9 months ago

0.0.12

10 months ago

0.0.11

10 months ago

0.0.10

10 months ago

0.0.9

10 months ago

0.0.8

10 months ago

0.0.7

10 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago

0.0.0-watch

10 months ago