1.0.2 • Published 3 years ago
custom-directives v1.0.2
Installation
Use npm to install the package
$ npm i custom-directives --save Import
You must add into your module imports the CustomDirectivesModule in order to add all of the directives.
import {CustomDirectivesModule} from 'custom-directives';
@NgModule({
// ...
imports: [
// ...
CustomDirectivesModule
]
})How to use
You can use directives like below.
- Only number
With comma(,):
<input type="text" onlyNumber thousandSeperator="','" /> <!-- Output: "55,25" -->
Or With dot(.):
<input type="text" onlyNumber thousandSeperator="'.'" /> <!-- Output: "55.25" -->- High Light
<p [appHighlight]="'#58DB9E'" > test</p>Contributing
- Before adding any new feature or a fix make sure to open an issue first!
Make sure you have angular-cli installed globally.
$ npm install -g angular-cliClone the project, and install dependencies.
$ git clone https://github.com/ismailkasan/custom-directives.git
$ npm installCreate a new branch
$ git checkout -b feat/someFeaturemake sure everything is running properly
Commit & push, and make a pull request!