The main application contains examples and is on StackBlitz. Click 'Install Missing Packages' and 'Install Missing Dependencies' to get it running.
This project was generated with Angular CLI version 7.2.2.
Commonly needed directives and services
- Capitalize and Trim pipes
- EnsureModuleLoadedOnceGuard for core & other modules
Directives and services for creating forms
- Autofocus directive
- FormValidators including range and restrictedWords
- GenericValidator class for Reactive Forms
- ValidationForm that implements GenericValidator and can be extended
- IdleFormsModule & IdleReactiveFormsModule export FormModule & ReactiveFormsModule respectively
The http service
- AddHeaderInterceptor & AddXmlHeaderInterceptor for adding application Content-Type to the headers of http calls
- GenericDataService is an abstract class that provides get/post/put/delete functionality for generic types
- Code comments & documentation
- Unit tests for all features
Possible future enhancements
- Directives for the validation functions so they can be used in template-driven forms
- Http Interceptors for logging & caching
- Extensible logging service
Running the example application
ng serve or
npm start for a dev server. Navigate to
http://localhost:4200/. The app will automatically reload if you change any of the application source files.
Running unit tests
ng test or
ng test ng-idle-common or
ng test ng-idle-forms or
ng test ng-idle-http to execute the unit tests via Karma.