@q2devops/schematics
v0.0.4
Published
This package contains a custom Angular schematic command ```ng generate:dashboard``` that generates a dashboard component in your Angular application. These generated components use Q2s datahelper service.
Downloads
10
Readme
q2devops/schematics
This package contains a custom Angular schematic command ng generate:dashboard
that generates a dashboard component in your Angular application. These generated components use Q2s datahelper service.
Installation
To install this package, run:
npm install --save-dev @q2devops/schematics
To use this schematic command, run:
ng generate @q2devops/schematics:dashboard
Usage
When using interactive terminal you will receive prompts for all the neccessary information.
Properties
name
: The name of the dashboard component. This is a required property.client
: A boolean value indicating whether this is a client or server side table. If not specified, defaults toserver
.service
: The path of the dashboard API. This is a required property.path
: The path where the dashboard component should be created. If not specified, defaults to the current path.skipImport
: A boolean value indicating whether this component should be imported into the owning NgModule. If not specified, defaults tofalse
.project
: The name of the project. If not specified, defaults to the current project name.
Example
To generate a dashboard component with the name dashboard1
and the path of the dashboard API as dashboard/api
and the location of the component being src/app/my-dashboard, run the following command:bash
ng generate @q2devops/schematics:dashboard --name=dashboard1 --service=dashboard/api --client=false --path=src/app/my-dashboard
Aliases
- Can also be run with
ng generate @q2devops/schematics:dash