Skip to content
A set of libraries for extending Angular functionality
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
e2e
packages
src uploaded packages to npm. Demo cleanup and updated README Feb 20, 2019
.editorconfig
.gitignore
LICENSE
README.md
angular.json
package-lock.json
package.json
tsconfig.json
tslint.json

README.md

ng-idle

GitHub version

Custom libraries that provided extended functionality to Angular. I have included some common code that I have gathered throughout the Pluralsight Angular skill learning path.

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.

Libraries

ng-idle-common

npmjs

Commonly needed directives and services

  • Capitalize and Trim pipes
  • EnsureModuleLoadedOnceGuard for core & other modules

ng-idle-forms

npmjs

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

ng-idle-http

npmjs

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

Outstanding items

  • 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

Run 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

Run 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.

You can’t perform that action at this time.