0.0.2 • Published 6 years ago
ngx-nepali-unicode v0.0.2
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-unicodeUsage
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.
- Using as Angular
directivein your template
<fieldset>
नेपालीमा टाइप गर्नुहोस्:<br/>
<textarea rows="10" cols="30" nepaliUnicode placeholder="नेपालीमा टाइप गर्नुहोस्"></textarea>
</fieldset>
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>- Using as Angular
pipein your template
<p>{{ 'gfdM' | nepaliUnicode }}:</p> equivalent to
नामःCreator
Hikmat Sijapati
License
ngx-nepali-unicode is MIT licensed.