Integrating the Report Viewer into Standalone Angular Component
Our sample projects and report templates can help you learn the basics of working with our products.Modern Angular applications can be built from standalone components that declare their own dependencies, without a central NgModule.
Importing directly in the component. Instead of registering
Using the component in the template. The viewer itself is used exactly as in a module-based application:
The server side is identical to the basic integration — a controller with the
Importing directly in the component. Instead of registering
StimulsoftViewerModule in a module, list it in the component's own imports array:import { Component } from '@angular/core';
import { StimulsoftViewerModule } from 'stimulsoft-viewer-angular';
@Component({
selector: 'app-root',
imports: [StimulsoftViewerModule],
templateUrl: './app.component.html',
styleUrl: './app.component.css'
})
export class AppComponent {
title = 'viewer';
}Using the component in the template. The viewer itself is used exactly as in a module-based application:
<stimulsoft-viewer-angular
[requestUrl]="'/Viewer/{action}'"
[action]="'InitViewer'"
[height]="'100vh'">
</stimulsoft-viewer-angular>The server side is identical to the basic integration — a controller with the
InitViewer, GetReport and ViewerEvent actions supplies the options and the report.