Cookies concent notice

This site uses cookies from Google to deliver its services and to analyze traffic.
Learn more
Skip to main content
This site is no longer updated.Head to Angular.devHome
/

This is the archived documentation for Angular v17. Please visit angular.dev to see this page for the current version of Angular.

Scroll

An event triggered by scrolling.

      
      class Scroll {
  constructor(routerEvent: NavigationEnd | NavigationSkipped, position: [number, number], anchor: string)
  type: EventType.Scroll
  routerEvent: NavigationEnd | NavigationSkipped
  position: [...]
  anchor: string | null
toString(): string }

Constructor

      
      constructor(routerEvent: NavigationEnd | NavigationSkipped, position: [number, number], anchor: string)
    
Parameters
routerEvent NavigationEnd | NavigationSkipped
position [number, number]
anchor string

Properties

Property Description
type: EventType.Scroll Read-Only
routerEvent: NavigationEnd | NavigationSkipped Read-Only Declared in Constructor
position: [ number, number ] | null Read-Only Declared in Constructor
anchor: string | null Read-Only Declared in Constructor

Methods

      
      toString(): string
    
Parameters

There are no parameters.

Returns

string