Control validity directives and components for Angular forms.
npm install @nowzoo/ngx-formControl validity directives and components for Angular forms.
Project & README
|
Demo
|
Demo Source Code
|
Documentation
``bash`
npm i @nowzoo/ngx-form --save
Import the module...
`typescript
import { NgxFormModule } from '@nowzoo/ngx-form';
@NgModule({
//...
imports: [
//...
ReactiveFormsModule, // or FormsModule
NgxFormModule
],
//...
})
export class AppModule { }
`
Use the directives and components...
`html
id="reactive-demo-email"
type="text"
[formControl]="fcEmail"
ngxControlInvalidClass
ngxControlValidClass
class="form-control form-control-lg">
Validity: {{emailValidity.validity$ | async | json}}
`
Clone the main repo and npm install...
`bash`
git clone https://github.com/nowzoo/ngx-libs.git
cd ngx-libs
npm i
The library files are in projects/ngx-form.
The demo code is in projects/ngx-form-demo.
Building the library...
`bash`
ng build ngx-form
Testing the library...
`bash`
ng test ngx-formwallaby.js
To test with Wallaby, use the config at the root of the project directory.
Serving the demo...
`bash``make sure you've built the library locally first with ng build ngx-form
ng serve ngx-form-demo