Angular UI Components Documentation
The Angular ScrollView can be used for viewing content which is wider than the visible area outlined by the device's screen. This guide adds the Angular ScrollView (jqxScrollView) to an app, then shows how to set its options, handle its events and call its methods.
jqwidgets-ngjqwidgets-ng/jqxscrollview 
In an Angular project (to start one, see Getting started with Angular), add the package with the Angular CLI. It asks for a theme and adds the styles to angular.json:
ng add jqwidgets-ng
Components are standalone: add jqxScrollViewModule to the imports of the component that uses it.
import { Component } from '@angular/core';
import { jqxScrollViewModule } from 'jqwidgets-ng/jqxscrollview';
@Component({
selector: 'app-root',
imports: [jqxScrollViewModule],
templateUrl: './app.html'
})
export class App {}
The source of the live Default Functionality demo.
<jqxScrollView #myScrollView
[width]="600" [height]="450" [buttonsOffset]="[0, 0]">
<div><div class="photo" style="background-image: url(https://www.jqwidgets.com/angular/images/imageNature1.jpg)"></div></div>
<div><div class="photo" style="background-image: url(https://www.jqwidgets.com/angular/images/imageNature2.jpg)"></div></div>
<div><div class="photo" style="background-image: url(https://www.jqwidgets.com/angular/images/imageNature3.jpg)"></div></div>
<div><div class="photo" style="background-image: url(https://www.jqwidgets.com/angular/images/imageNature4.jpg)"></div></div>
<div><div class="photo" style="background-image: url(https://www.jqwidgets.com/angular/images/imageNature5.jpg)"></div></div>
</jqxScrollView>
<div style="margin-top: 2em"></div>
<jqxButton (onClick)="onStartClicked()"
[width]="120" [height]="25">
Start SlideShow
</jqxButton>
<jqxButton (onClick)="onStopClicked()"
[width]="120" [height]="25">
Stop SlideShow
</jqxButton>
import { Component, ViewEncapsulation, viewChild } from '@angular/core';
import { jqxScrollViewComponent } from 'jqwidgets-ng/jqxscrollview';
import { CommonModule } from '@angular/common';
import { jqxScrollViewModule } from 'jqwidgets-ng/jqxscrollview';
import { jqxButtonModule } from 'jqwidgets-ng/jqxbuttons';
@Component({
imports: [CommonModule, jqxScrollViewModule, jqxButtonModule],
selector: 'app-root',
templateUrl: './app.html',
styleUrl: './app.css',
encapsulation: ViewEncapsulation.None
})
export class App {
readonly myScrollView = viewChild.required<jqxScrollViewComponent>('myScrollView');
onStartClicked(): void {
this.myScrollView().slideShow(true);
}
onStopClicked(): void {
this.myScrollView().slideShow(false);
}
}
.photo {
width: 600px;
height: 450px;
background-color: #000;
background-position: center;
background-repeat: no-repeat;
}
Options are inputs, bound with [name]="value".
Events are outputs named on plus the event name with a capital first letter. For example, pageChanged: This event is triggered when the current page is changed.
<jqxScrollView (onPageChanged)="onPageChanged($event)"></jqxScrollView>
onPageChanged(event: any): void {
console.log(event.args);
}
Get the component with a signal query and call its methods. For example, refresh: Refreshes the widget.
<jqxScrollView #myScrollView></jqxScrollView>
import { Component, viewChild } from '@angular/core';
import { jqxScrollViewModule, jqxScrollViewComponent } from 'jqwidgets-ng/jqxscrollview';
@Component({
selector: 'app-root',
imports: [jqxScrollViewModule],
templateUrl: './app.html'
})
export class App {
readonly myScrollView = viewChild.required<jqxScrollViewComponent>('myScrollView');
run(): void {
this.myScrollView().refresh();
}
}