Running the Angular Viewer with Spring Boot
Our sample projects and report templates can help you learn the basics of working with our products.The Stimulsoft Angular viewer runs as a front-end component that talks to a Java backend (a Spring Boot controller) through a request URL.
Place the Angular viewer component.
How it works. The Angular front end renders in the browser and calls the a Spring Boot controller backend for data and actions, splitting UI from server logic.
Place the Angular viewer component.
<stimulsoft-viewer-angular
[requestUrl]="'http://localhost:8080/viewer/angular_viewer?a={action}'"
[properties]="{ reportName: 'Dashboards.mrt' }">
</stimulsoft-viewer-angular>Handle requests in the Java servlet.public class StiAngularViewerActionServlet extends HttpServlet implements StiAngularViewerHandler {
protected void processing(HttpServletRequest request, HttpServletResponse response) {
StiWebViewerActionServletHelper.processing(
new StiHttpServletRequest(request, this), new StiHttpServletResponse(response));
}
public StiWebViewerOptions getOptions(StiHttpServletRequest req, StiHttpServletResponse res) {
return new StiWebViewerOptions();
}
}<stimulsoft-viewer-angular [requestUrl] [properties]>— the Angular component;requestUrlpoints at the Java action endpoint.StiAngularViewerHandler— the servlet processes the viewer's actions and returns the report data.
How it works. The Angular front end renders in the browser and calls the a Spring Boot controller backend for data and actions, splitting UI from server logic.