@fivethree/async-pipes
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

Async Pipes

RxJS async pipes for Angular

📦 Installation

To get started, install the package from npm. The latest version supports Angular 7 and above.

You can use either npm or yarn to install @fivethree/async-pipes from npm.

npm install @fivethree/async-pipes --save

# or if you are using yarn
yarn add @fivethree/async-pipes

🔨 Usage

Import the pipe module you like to use into your page or components module:

import { NgModule } from '@angular/core';
import { PendingPipeModule } from '@fivethree/async-pipes';

@NgModule({
    imports: [
        PendingPipeModule
    ]
})
export class HomePageModule {}

Pipes

EmptyPipe -> empty

<div *ngIf="numbers$ | empty | async">
    Empty State - Source Observable emitted an empty array
</div>

ErrorPipe -> error

 <div *ngIf="numbers$ | error | async as error">
    {{error}}
</div>

PendingPipe -> pending

<div *ngIf="numbers$ | pending | async">
    Pending State - Source Observable has not emitted yet
</div>

Package Sidebar

Install

npm i @fivethree/async-pipes

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

71.2 kB

Total Files

35

Last publish

Collaborators

  • marcjulian
  • garygrossgarten