0.0.21 • Published 1 year ago

@gengotech/ngx-furigana v0.0.21

Weekly downloads
-
License
GPL-3.0-or-later
Repository
github
Last release
1 year 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

1 year ago

0.0.20

2 years ago

0.0.19

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0-watch

2 years ago