Dmn-js Modeler with angular js


#1

HI,

I am trying using dmn-js Modeler into my application. but not working.

I am getting some errors :

this is my js code:

var viewer, DmnModeler, initialTemplate;
        DmnModeler = window.DmnJS;

        initialTemplate = '<?xml version="1.0" encoding="UTF-8"?' ...'

        viewer = new DmnModeler({ container: '#body' });

        viewer.importXML(xml, function(err) {

          if (!err) {
            console.log('success!');
          } else {
            console.log('something went wrong:', err);
          }
        });

  });

div id=“body”

div
src=“bower_components/dmn-js/dist/dmn-modeler.js”

This errors i am getting :

Table.js:54 Failed to instantiate component

Table.js:55 Error: No provider for “canvas”! (Resolving: popupMenu -> canvas)
angular.js:14362 Error: No provider for “canvas”! (Resolving: popupMenu -> canvas)

can someone help me?

Thanks.


#2

Are you using Bower to develop the project ?

If so, me too, the same error with DMN 0.8.x

I’ve reported it (https://github.com/bpmn-io/bower-dmn-js/issues/1)