Core UI of GHD for Angular 6


6.0.112 years ago4 years agoMinified + gzip package size for @ghd/core-ui in KB


Angular Core UI

This package contains contains common UI components

Using this package:

Go to your Angular 6.X project and run this command:

> npm install @ghd/core-ui --save
import { GHDCoreUIModule } from '@ghd/core-ui';
// import UIModule to your base app.module or a shared module accross your app
    imports: [

Package Exports:

Dialog Component:ng b

<ghd-dialog-confirm [opened]="true" [title]="'Please confirm'" [message]="'Are you sure?'"></ghd-dialog-confirm>

Toast/Alert/Notification Component:


message: (string) - REQUIRED: Your custom string message

timeout: (number) - OPTIONAL: Timeout in milliseconds to display alert message (default: 3000 milliseconds)

// import GHDAlertModule to your base app.module or a shared module accross your app
import { GHDAlertModule } from '@ghd/core-ui';
    imports: [
// On your component, import the Alert Service
import { GHDAlertService } from '@ghd/core-ui';
// and inject it
export class MyComponent {
    constructor(private alertService: GHDAlertService) {}

    // then use it!
    myFunction() {
        this.alertService.success('Successfully Added Form', 5000);
        this.alertService.error('Error Added Form', 10000);
        this.alertService.warn('Warning, please resolve immediately');

System Requirements (optional: for building this package):

  • Node v8.X.X (might as well use current stable v8.11.1 as of the current day of writing)
  • npm v5.6.0
  • rollup v0.58.2

To know more about packaging with npm and angular click here

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.