Core UI of GHD for Angular 6

angular, javascript, typescript
npm install @ghd/core-ui@7.0.2


Angular Core UI

This package contains contains common UI components

Using this package:

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

> npm install @ghd/core-ui --save
import { UIModule } 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 v6.X.X~v8.X.X (might as well use current stable v8.1.4 as of the current day of writing)
  • npm v4.3.0
  • rollup v0.45.2
  • rimraf v2.6.1

To know more about packaging with npm and angular click here