Skip to content

Angular package that converts Unicode text into Nepali Preeti font.

Notifications You must be signed in to change notification settings

hikmat-sijapati/ngx-nepali-unicode

Repository files navigation

ngx-nepali-unicode

Angular package that converts Unicode text into Nepali Preeti font.

Installation

Use Node Package Manager npm to install ngx-nepali-unicode.

npm install ngx-nepali-unicode

Usage

Import NgxNepaliUnicodeModule in the root module(AppModule):

// Import module
import {NgxNepaliUnicodeModule} from 'ngx-nepali-unicode';

@NgModule({
  imports: [
    // ...
    NgxNepaliUnicodeModule.forRoot()
  ]
})
export class AppModule {}

You can use ngx-nepali-unicode as both Angular pipe & directive.

  1. Using as Angular directive in your template
    <fieldset>
      नेपालीमा टाइप गर्नुहोस्:<br/>
      <textarea rows="10" cols="30" nepaliUnicode placeholder="नेपालीमा टाइप गर्नुहोस्"></textarea>
    </fieldset>

Nepali-unicode-directive

if you want to bind converted nepali preeti text into your formControl value just pass [formControl] as Angular Input.

Component:

//...
import { FormControl } from '@angular/forms';

class AppComponent implements OnInit {
 //FormControl for binding converted Nepali Preeti text 
 public descriptionNep: FormControl = new FormControl();
  constructor() {}
  ngOnInit() {
    
  }
}

Template:

     <fieldset>
      Description in Nepali:<br/>
      <textarea rows="10" cols="30" nepaliUnicode [formControl]="descriptionNep" placeholder="नेपालीमा टाइप गर्नुहोस्"></textarea>
    </fieldset>
    <p>You have entered: {{ descriptionNep.value }}</p>
  1. Using as Angular pipe in your template
    <p>{{ 'gfdM' | nepaliUnicode }}:</p> equivalent to
    नामः

Creator

License

ngx-nepali-unicode is MIT licensed.

About

Angular package that converts Unicode text into Nepali Preeti font.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published