Comments (5)
I think I am facing the same issue - details below.
Did you by chance found a workaround?
Issue description:
I updated bpmn-js version to "bpmn-js": "^2.0.1" and at runtime seeing the following error:
AppComponent_Host.ngfactory.js? [sm]:1 ERROR TypeError: bpmn_js_1.Modeler is not a constructor
at AppComponent.ngOnInit (app.component.ts:70)
at checkAndUpdateDirectiveInline (core.js:12369)
at checkAndUpdateNodeInline (core.js:13893)
at checkAndUpdateNode (core.js:13836)
at debugCheckAndUpdateNode (core.js:14729)
at debugCheckDirectivesFn (core.js:14670)
at Object.eval [as updateDirectives] (AppComponent_Host.ngfactory.js? [sm]:1)
at Object.debugUpdateDirectives [as updateDirectives] (core.js:14655)
at checkAndUpdateView (core.js:13802)
at callWithDebugContext (core.js:15056)
from angular-bpmn.
Did you by chance found a workaround?
For this repo - no. But I've created new angular app with cli (6) and was able to add modeler (and both types of bpmn-js viewers if you want) just by importing BpmnModeler
import BpmnModeler from 'bpmn-js/lib/Modeler';
export class BpmnModelerComponent implements OnInit {
modeler: BpmnModeler;
...
ngOnInit() {
this.modeler = new BpmnModeler({
container: '#canvas'
});
this.modeler.importXML(initialDiagram, err => {
if (!err) {
this.modeler.get('canvas').zoom('fit-viewport');
} else {
console.error('something went wrong:', err);
}
});
}
}
I use scss for my apps so these two lines were added to src/styles.scss
@import "~bpmn-js/dist/assets/diagram-js.css";
@import "~bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css";
That's all (+ npm i bpmn-js --save
of course)
from angular-bpmn.
Thanks a lot for the info.
I actually procees with Narve's code and found solution for the issue.
In the latest bpmn-js there were updated export signature of several methods, so the import syntax should be update to:
bpmn-js.ts ::
import _Modeler from 'bpmn-js/lib/Modeler.js';
import * as _PropertiesPanelModule from 'bpmn-js-properties-panel';
import * as _BpmnPropertiesProvider from 'bpmn-js-properties-panel/lib/provider/bpmn';
import * as _EntryFactory from 'bpmn-js-properties-panel/lib/factory/EntryFactory.js';
import _PaletteProvider from 'bpmn-js/lib/features/palette/PaletteProvider.js';
from angular-bpmn.
Did you try by chance to implement CustomRenderer for your Angular app?
I can't make it working.
from angular-bpmn.
Thanks for your input. I will update to latest bpmn-js and commit. Next time, a pull request would be welcome :)
from angular-bpmn.
Related Issues (20)
- Properties panel HOT 1
- cant save and load work from locally HOT 2
- Hiding the default tools in palette present in angular-app HOT 2
- Customizing palette HOT 5
- importXML issue(bpmn file angular)
- Crash on runtime in --prod HOT 8
- Keyboard shortcuts are not working
- Request for library integration
- Sample Project not work HOT 1
- dmnjs with angular 5 HOT 1
- Implement i18n
- Create Tab according type
- how to add bpmn properties-panel
- Bind Form on dropped object HOT 1
- Override default palette entries with custom palette entries
- Getting error on ng build --prod HOT 4
- couldn't able to drag the components to the work sheet HOT 4
- Built-in Color Support not available? HOT 1
- BPMN Execute Engine? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-bpmn.