An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

[![MIT](https://img.shields.io/packagist/l/doctrine/orm.svg?style=flat-square)]()

> 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}}

```