New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@angular-kit/rx-hooks

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@angular-kit/rx-hooks

Reactive Lifecycle Hooks for Angular

latest
Source
npmnpm
Version
15.1.1
Version published
Maintainers
0
Created
Source

@angular-kit/rx-hooks

rx-hooks gives you finally reactive lifecycle hooks for Angular.

Installation

Run npm install @angular-kit/rx-hooks to install the library.

Usage

import {RxHooks$} from "@angular-kit/rx-hooks";

@Component({
  // ...
  hostDirectives: [RxHooks$]
})
export class MyComponent {
  hooks$ = inject(RxHooks$)

  constructor() {
      this.hooks$.onInit$.subscribe(() => console.log('onInit'))
      this.hooks$.onDestroy$.subscribe(() => console.log('onDestroy'))
      this.hooks$.onDoCheck$.subscribe(() => console.log('onDoCheck'))
      this.hooks$.onAfterContentInit$.subscribe(() => console.log('onAfterContentInit'))
      this.hooks$.onAfterContentChecked$.subscribe(() => console.log('onAfterContentChecked'))
  }
}

Supported hooks

All hooks except ngOnChanges are supported.

Versioning

The versioning of this library follows the versioning of Angular.

Keywords

angular

FAQs

Package last updated on 13 Sep 2024

Did you know?

Socket

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