Skip to content

Commit

Permalink
Pitfall section in readme.md for newcomers (#111)
Browse files Browse the repository at this point in the history
Co-authored-by: Artur Androsovych <[email protected]>
  • Loading branch information
cklam2 and arturovt authored Jul 9, 2020
1 parent 8515d8c commit f2a59eb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ You can use `--removeOnDestroy` flag for empty `OnDestroy` methods removing.
npx @ngneat/until-destroy --removeOnDestroy
```

## Potential Pitfalls

- The order of decorators is important, make sure to put `@UntilDestroy()` before the `@Component()` decorator.
- When using [`overrideComponent`](https://angular.io/api/core/testing/TestBed#overrideComponent) in unit tests remember that it overrides metadata and component definition. Invoke `UntilDestroy()(YourComponent);` to reapply the decorator. See [here](https://github.com/ngneat/until-destroy/issues/91#issuecomment-626470446) for an example.

## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Expand Down

0 comments on commit f2a59eb

Please sign in to comment.