https://github.com/lonli-lokli/ng-result
Set of Angular components/directives/pipes for work with https://github.com/Lonli-Lokli/ts-result
https://github.com/lonli-lokli/ng-result
angular functional-programming monad result
Last synced: 7 days ago
JSON representation
Set of Angular components/directives/pipes for work with https://github.com/Lonli-Lokli/ts-result
- Host: GitHub
- URL: https://github.com/lonli-lokli/ng-result
- Owner: Lonli-Lokli
- License: mit
- Created: 2022-10-31T22:09:34.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-04-16T11:18:47.000Z (over 2 years ago)
- Last Synced: 2025-09-15T11:13:16.792Z (about 1 month ago)
- Topics: angular, functional-programming, monad, result
- Language: TypeScript
- Homepage:
- Size: 1.5 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[]()
> Angular Library with set of components/directives/pipes for easier work with data, using https://github.com/Lonli-Lokli/ts-result
[Demo](https://lonli-lokli.github.io/ng-result/)
## About
[Result](https://github.com/Lonli-Lokli/ts-result) is an union of few types: ResultInitial, ResultPending, ResultFailure and ResultSuccess.While your data in initial or pending state just use `initial()` or `pending()`, because you don't have any real values in this case.
When you receive data from server, use `failure` or `success` function, it depends on what you received.## Installation
`ng add @lonli-lokli/ng-result`
## Usage
```html
Here is the response: {{ok}}
```