- 🌐 ngDiagram website: ngdiagram.dev
- 💻 ngDiagram GitHub: github.com/synergycodes/ng-diagram
- 📚 ngDiagram Documentation: Getting Started
- 🎤 Presentation: View slides
- 📖 Additional Resources: synergycodes.com/diagramming-resources
A showcase demonstrating how to use ng-diagram - an Angular library for creating interactive diagrams.
This directory contains all the core ng-diagram logic and showcases how to use the library. Start here to learn ng-diagram!
-
diagram.component.ts- Main diagram component with documentation on:- ng-diagram services (ModelService, SelectionService, ViewportService, etc.)
- Event handling (all diagram events with examples)
- Configuration setup
- Model initialization
-
services/diagram.config.ts- NgDiagramConfig with snapping, zoom, rotation, etc.properties-facade.service.ts- Properties panel integrationdebug-events.service.ts- Complete event handling referencecontext-menu-facade.service.ts- Clipboard and z-order operations
-
palette/- Drag & drop palette system:palette-data.ts- Palette item definitionspalette.component.ts- How ng-diagram drag & drop works- Components for palette items and drag previews
-
node-templates/- Custom node components:trigger-node/- Basic node with ports, resize, and rotationcustom-node/- Interactive node with status dropdowngroup-node/- Container node for groupingnode-template-map.ts- Type-to-component mapping
-
edge-templates/- Custom edge components:custom-edge/- Edge template with label support
Angular components that provide the UI around the diagram (navbar, sidebars, properties panel, context menu).
Shared TypeScript interfaces used across the application.
npm installTo start a local development server, run:
ng serveOnce the server is running, open your browser and navigate to http://localhost:4200/. The application will automatically reload whenever you modify any of the source files.
To build the project run:
ng buildThis will compile your project and store the build artifacts in the dist/ directory.