Use npm to install the package
$ npm i custom-directives --save
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
]
})
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>
- 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-cli
Clone the project, and install dependencies.
$ git clone https://github.com/ismailkasan/custom-directives.git
$ npm install
Create a new branch
$ git checkout -b feat/someFeature
make sure everything is running properly
Commit & push, and make a pull request!