NgDirectives
This library is Ivy Compatible and is tested against an Angular 9 app.
- A collection of
directives
to be used with Angular app to give additional functionality which will help to avoid wrong inputs - It is developed using
Angular >=9.0.0
and its newly introducedng g library
schematics. - This library is part of MatTypeahead project and it is generated with Angular CLI version 9.0.6.
- Library location:
projects/ng-directives
directory of this repository.
Examples/Demo
- A simple Example can be found under
src/app
directory of this repository.
Installation
npm i ng-directives
import { NgDirectivesModule } from "ng-directives";
selector: numberOnly
for number only validation
Usage
- Register the
NgDirectivesModule
in your app module.
import { NgDirectivesModule } from "ng-directives";
;; ;;;
- Use the directive
(NgDirectives)
in your component.
;
Running the example in local env
npm i
- Run
ng serve
for a dev server and running the demo app. Navigate tohttp://localhost:4200/
. The app will automatically reload if you change any of the source files.
Build the NgDirectives module
Run ng build NgDirectives
to build the library. The build artifacts will be stored in the dist/ng-directives
directory. Use the --prod
flag for a production build.
Credits
I want to thanks entire Angular team for creating this awesome framework.