### File

`projects/commons/src/lib/elements/toast/services/toast.service.ts`

### Index

###### Methods
Public open

### Constructor

`constructor(toast)`
Defined in projects/commons/src/lib/elements/toast/services/toast.service.ts:6
Parameters :
Name | Optional
toast | No

### Methods

Public open
`open(config: IToastConfig)`
Defined in projects/commons/src/lib/elements/toast/services/toast.service.ts:9
Parameters :
Name | Type | Optional
config | `IToastConfig` | No
Returns : `void`

    import { Inject, Injectable } from '@angular/core';

    import { IToastConfig } from '../interfaces';

    @Injectable()
    export class ToastService {
        constructor(@Inject('toast') private readonly toast) {}

        public open(config: IToastConfig) {
            this.toast({ duration: 5000, ...config, closeOnClick: !config.dismissible });
        }
    }

# result-matching ""

# No results matching ""