# @ngxs-extensions/decorators

Latest version **1.0.0** (published 2019-07-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ngxs-extensions/decorators
pnpm add @ngxs-extensions/decorators
yarn add @ngxs-extensions/decorators
bun add @ngxs-extensions/decorators
```

## 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.0 |
| Published | 2019-07-10 |
| First published | 2019-07-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 80.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | stefan-schubert |

## Links

- npm: https://www.npmjs.com/package/@ngxs-extensions/decorators
- Repository: https://github.com/stefan-schubert/ngxs-extensions
- Homepage: https://github.com/stefan-schubert/ngxs-extensions#readme
- Issues: https://github.com/stefan-schubert/ngxs-extensions/issues
- npm.io page: https://npm.io/package/@ngxs-extensions/decorators

## Dependencies (1)

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

## Recent versions

- 1.0.0 (latest) — 2019-07-10

## README

# ngxs-extensions

[![Build Status](https://travis-ci.org/stefan-schubert/ngxs-extensions.svg?branch=master)](https://travis-ci.org/stefan-schubert/ngxs-extensions)
[![NPM](https://badge.fury.io/js/%40ngxs-extensions%2Fdecorators.svg)](https://www.npmjs.com/package/@ngxs-extensions/decorators)
[![License](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/stefan-schubert/ngxs-extensions/blob/master/LICENSE)

Extends @ngxs/store with decorators and maybe some time with other things...

## Install

To install `@ngxs-extensions/decorators` run the following command:

```console
npm install @ngxs-extensions/decorators
```

## Usage


Import the module into your root application module:

```typescript
import { NgModule } from '@angular/core';
import { NgxsModule } from '@ngxs/store';
import { NgxsExtensionsDecoratorsModule } from '@ngxs-extensions/decorators';

@NgModule({
  imports: [
    NgxsModule.forRoot(states),
    NgxsExtensionsDecoratorsModule.forRoot()
  ]
})
export class AppModule {}
```

## @ResetStateToDefault
`@ResetStateToDefault` resets a state to default on method call. Can be used to reset a detail state on destroying of a detail view.

```typescript
@ResetStateToDefault(DetailState)
ngOnDestroy() {
  // cleanup other things...
}
```

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