How To Add An Angular Diagram Component To An Angular CLI Project

Sample date Updated on Jun 22, 2026
add-angular-diagram angular-diagram-getting-started angular-diagram-integration angular-diagram-setup syncfusion-angular-diagram

A quick start project that shows how to add a Angular Diagram component to an Angular CLI project. This project also includes a code snippet to create nodes and connectors, join the nodes using connectors, add segments and annotations to the connectors.

Examples: https://ej2.syncfusion.com/angular/demos/#/bootstrap5/diagram/default-functionalities

Documentation: https://ej2.syncfusion.com/angular/documentation/diagram/getting-started

Project pre-requisites

Make sure that you have the compatible versions of TypeScript and Angular in your machine before starting to work on this project.

Angular 4+

TypeScript 2.6+

How to run this application?

To run this application, you need to first clone the how-to-add-angular-diagrams-to-an-angular-project repository and then navigate to its appropriate path where it has been in your system.

To do so, open the command prompt and run the below commands one after the other.

git clone diagram-example

cd diagram-example

Installing

Once done with downloading, next you need to install the necessary packages required to run this application locally. The npm install command will install all the needed angular packages into your current project and to do so, run the below command.

npm install

Running on development server

Run ng serve command for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Up arrow