# bpmn-js-example-angular **Repository Path**: mirrors_bpmn-io/bpmn-js-example-angular ## Basic Information - **Project Name**: bpmn-js-example-angular - **Description**: An example how to integrate bpmn-js with an Angular application. - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-24 - **Last Updated**: 2025-11-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # bpmn-js-example-angular [](https://github.com/bpmn-io/bpmn-js-example-angular/actions?query=workflow%3ACI) An example how to integrate bpmn-js with an [Angular](https://angular.io/) application.  ## Prerequisites Assume you bootstrapped your application using the `ng` command: ```sh ng new bpmn-js-app --defaults=true cd bpmn-js-app ``` ## Integrating bpmn-js Include the style files for diagram-js and bpmn in your [`Angular.json file`](./bpmn-js-app/angular.json) under projects > your project > architect > build > options > styles ```json "styles": [ "node_modules/bpmn-js/dist/assets/diagram-js.css", "node_modules/bpmn-js/dist/assets/bpmn-js.css", "node_modules/bpmn-js/dist/assets/bpmn-font/css/bpmn.css", "src/styles.css" ], ``` Create a component similar to [`DiagramComponent`](./bpmn-js-app/src/app/diagram/diagram.component.ts): ```typescript import { AfterContentInit, Component, ElementRef, Input, OnChanges, OnDestroy, Output, ViewChild, SimpleChanges, EventEmitter } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { catchError } from 'rxjs/operators'; /** * You may include a different variant of BpmnJS: * * bpmn-viewer - displays BPMN diagrams without the ability * to navigate them * bpmn-modeler - bootstraps a full-fledged BPMN editor */ import * as BpmnJS from 'bpmn-js/dist/bpmn-modeler.production.min.js'; import { importDiagram } from './rx'; import { throwError } from 'rxjs'; @Component({ selector: 'app-diagram', template: `
`, styles: [ ` .diagram-container { height: 100%; width: 100%; } ` ] }) export class DiagramComponent implements AfterContentInit, OnChanges, OnDestroy { // instantiate BpmnJS with component private bpmnJS: BpmnJS; // retrieve DOM element reference @ViewChild('ref', { static: true }) private el: ElementRef; @Output() private importDone: EventEmitter