cdx-library
v0.5.7
Published
Angular library for reusable components
Downloads
64
Readme
CdxLibrary
This library contains modules and components to develop in a easy way Angular WebApps.
Installation
> npm install cdx-library --save
Structure
This project aims to provide a modern and useful conventions to improve the development time and quality, according to the main design patterns.
- Dependency Injection - Provide and inject services in other classes.
- MVVM - The MVVM model supports two-way data binding between View and ViewModel.
- RxJS - Event driven programming using the Observable pattern.
- Lazy-Loading - Dynamically import modules and resources from the network, on-demand.
The project has two main folders:
- core - in which there are services, pipes, models and the base structure to injects these classes.
- modules - in which there are components (HTML/SCSS/TS), modules and relative routing modules.
Services
AuthService
AuthService
provides an interface to the main methods for the users' authentication.
ChangelogService
ChangelogService
provides an overridable service to get the app's changelog.
ConfigService
ConfigService
provides the AppConfig interface injection.
CrudService
CrudService
provides useful methods to do CRUD operations.
ItemsService
ItemsPipe
transforms various object into a wrapper/generic one.
StorageService
StorageService
provides the interface to do CRUD operations with a storage.
UIService
UIService
provides routes, light/dark theme, show/hide menus controllers.
Modules
AppContainer
AppContainer
is the substitute of the defaultAppComponent
. It allows to update the whole app style in combination with theUIService
.
AppVersion
AppVersion
is a simple dialog with the new app version and link to the changelog route module.
Authentication
AuthenticationModule
is a complete module with configurable providers and service to allows user to sign-up and sign-in to the application.
Changelog
ChangelogModule
is a complete module where the app's changelog is shown.
ConfirmationDialog
ConfirmationDialog
is a simple dialog with a title and message to show and action buttons.
DragDrop
DragDrop
is a component useful to upload file of various genres, as images, music, etc. You can drag & drop files or add by clicking.
DrawerContainer
DrawerContainerModule
is a container in which you can show your lazy-modules (or directly components) inside the availablerouter-outlet
. You can specify the drawer's style, the items to show and use a right-drawer for other operations.
DynamicForm
DynamicForm
is a powerful module whence to build a form only specifying types, constraints, label and key from.ts
, without any HTML. Furthemore you can override styling.
Footer
Footer
is a simple component to put on the bottom of the page. You can set the items to show and their relative routing.
FooterCopyright
Footer
is a simple component for display copyright.
ItemsList
NamePhotos
PageContainer
PageContainer
is a composite component in which there are Footer, FooterCopyright and you can specify the page content as you want.
PhotoCard
SaveButton
SaveButton
is a simple material button with a state (disabled, enabled, loading) and a subject to change it.
SelectableCard
ThemeSwitch
ThemeSwitch
is a simple component useful to change the app theme between light and dark.