Skip to main content
Version: 4.x

Installation

npm version npm downloads

@foresightjs/angular is the official Angular package for ForesightJS. It ships the standalone [fsForesight] directive for the common case, plus ForesightService, ForesightComponent, and injectForesightEvent for manual registration and event listeners.

npm install @foresightjs/angular js.foresight
# or
pnpm add @foresightjs/angular js.foresight
# or
yarn add @foresightjs/angular js.foresight
import { ForesightDirective, ForesightManager, ForesightService } from "@foresightjs/angular"

Requires Angular 17 or newer.

Configuring the manager

You don't have to configure anything. The manager auto-initializes with sensible defaults the first time you register an element.

If you want to tweak global behavior, call ForesightManager.initialize() once in your main.ts before your app renders. See Initialize the Manager and Global Settings.

Devtools

The visual Development Tools live in their own package (js.foresight-devtools) and work the same regardless of framework.