Socket
Socket
Sign inDemoInstall

@ngneat/subscribe

Package Overview
Dependencies
4
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ngneat/subscribe

Subscription Handling Directive


Version published
Maintainers
3
Weekly downloads
2,365
decreased by-11.22%

Weekly downloads

Readme

Source

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();
}

Keywords

FAQs

Last updated on 30 Nov 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc