hello,
i have a bpmn modeler embedded in an angular application,
i want to open a modal in the angular side once i click in a button in the bpmn property panel
please help, how can i acheive that
Hey,
bpmn-js-properties-panel emits different events depending on what you do. For instance clicking on a checkbox or changing a textbox will result in EventBus emitting a propertiesPanel.changed
event.
You can then hook into this event using EventBus: https://github.com/bpmn-io/bpmn-js-examples/blob/master/interaction/README.md#hook-into-diagram-events
and execute Angular level code inside the callback function.
and execute Angular level code inside the callback function
how we could use a callback function, is there a way for example to inject an angular service instance or how exactly if you have an idea :))
I do not really know how you open a dialogue with Angular. Lets say you have this function called openDialogue
which opens a dialogue.
You can then hook into propertiesPanel.changed
event like this:
eventBus.on(`propertiesPanel.changed`, function(e) {
openDialogue();
});
There’s more detailed information here about how to hook into events, how to get an instance of eventBus etc.
i get it working now after properly inject my service using this thread
but you your suggestion helped me a lot
thank you