I am working with Angular2 within Electron seeded from https://github.com/maximegris/angular-electron
I have installed Mermaid and got it working nearly exactly as I need it. My flowchart does display correctly as intended.
The only problem that I am having is with the click event.
(See interaction section of this page https://mermaidjs.github.io/flowchart.html)
Where I need to define within my mermaid markup click A callback
and A will be passed to the call back.
The problem that I have is that 'callback' must be a native javascript function not a typescript function. I am targeting a "BoxClick" function with in my ProjectManagementPageConnectionsComponent. And I can see that in main.bundle.js it is compiled to something similar to: ProjectManagementPageConnectionsComponent.prototype.BoxClick = function () {
And when debugging in the console I try to execute ProjectManagementPageConnectionComponent.BoxClick();
but it says that ProjectManagementPageConnectionComponent is not defined. but in main.bundle.js it looks like it is defined. So is there a parent namespace above it that I am missing? Because I am pretty sure if I can get this function to work in the console, then I can call that function in my mermaid markup too.
In the end I want a navigation to happen from there. Now according to the mermaid docs documentation I can define a URL. And I have done that and it does work; however, it opens in a new window. I want it to navigate within the same window and it appears the only way to do that is by using a function. But the namespace of the function seems unreachable.