@ngneat/subscribe
TypeScript icon, indicating that this package has built-in type declarations

4.0.0 • Public • Published

MIT commitizen PRs styled with prettier All Contributors ngneat spectator

Subscription Handling Directive

Installation

npm install @ngneat/subscribe

Usage

Now we can import the SubscribeDirective and use the subscribe directive in our template:

import { SubscribeDirective } from '@ngneat/subscribe';

@Component({
  imports: [SubscribeDirective],
  template: `
    <ng-container *subscribe="users$ as users; let error=error">
      {{ users | json }}
      {{ error }}
    </ng-container>
  `
})
class MyComponent {
  users$ = inject(UserService).getUsers();
}

Package Sidebar

Install

npm i @ngneat/subscribe

Weekly Downloads

2,995

Version

4.0.0

License

MIT

Unpacked Size

28.2 kB

Total Files

12

Last publish

Collaborators

  • netanel-ngneat
  • itayod
  • shahar.kazaz