# @lhn/mat-alert

> Implementation of MatDialog shown as an alert message

Latest version **1.0.4** (published 2021-10-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @lhn/mat-alert
pnpm add @lhn/mat-alert
yarn add @lhn/mat-alert
bun add @lhn/mat-alert
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2021-10-12 |
| First published | 2019-10-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 49.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Leandro Hermes |
| Maintainers | lhn |
| Keywords | ngx, ng, angular, material, alert, dialog, angular alert, angular material alert, material alert |

## Links

- npm: https://www.npmjs.com/package/@lhn/mat-alert
- Repository: https://github.com/leandro-hermes/lhn-libraries
- Homepage: https://github.com/leandro-hermes/lhn-libraries#readme
- Issues: https://github.com/leandro-hermes/lhn-libraries/issues
- npm.io page: https://npm.io/package/@lhn/mat-alert

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^2.0.0

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [btrz-health-check](https://npm.io/package/btrz-health-check.md) — 474 weekly downloads

## Recent versions

- 1.0.4 (latest) — 2021-10-12
- 1.0.3 — 2021-10-12
- 1.0.2 — 2021-10-12
- 1.0.1 — 2021-10-12
- 1.0.0 — 2021-08-04
- 0.1.3 — 2020-06-17
- 0.1.2 — 2020-05-14
- 0.1.1 — 2020-05-14
- 0.1.0 — 2020-05-14
- 0.0.13 — 2020-05-14
- 0.0.12 — 2020-04-14
- 0.0.11 — 2020-04-08
- 0.0.10 — 2019-12-09
- 0.0.9 — 2019-12-09
- 0.0.8 — 2019-12-09
- … 2 more at https://npm.io/package/@lhn/mat-alert/versions

## README

# @lhn/mat-alert

[![NPM](https://nodei.co/npm/@lhn/mat-alert.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/@lhn/mat-alert/)

![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/leandro-hermes/lhn-libraries?label=github&color=24292e)
![npm](https://img.shields.io/npm/v/@lhn/mat-alert?color=CB3837)
![NPM](https://img.shields.io/npm/l/@lhn/mat-alert)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/edce6ef174074698af4378e1081c62eb)](https://www.codacy.com/manual/lhn/mat-alert?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=leandro-hermes/mat-alert&amp;utm_campaign=Badge_Grade)

## Dependencies

- `@angular/core@>=6.0.0` 
- `@angular/common@>=6.0.0` 
- `@angular/material@>=6.0.0` 

## Usage

Add `MatAlertModule` to the `imports` section of the NgModule you want to use:

```typescript
import { MatAlertModule } from '@lhn/mat-alert';
 
@NgModule({
 // ...
 imports: [
   // ...
   MatAlertModule,
 ]
})
```

Inject the service into the component:

```typescript
import { MatAlert } from '@lhn/mat-alert';
 
@Component({
  // ...
})
export class AppComponent {
  constructor(private alert: MatAlert) {}
  // ..

  public showAlert() {
    this.alert.show('Message title', 'Message content (<em>supports HMTL</em>)', {
      buttonText: 'Great!',
      buttonTheme: 'accent',
      raisedButton: true,
    });
  }
}
```

---
_Source: https://npm.io/package/@lhn/mat-alert · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
