Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to use mermaid properly in Angular 7 along with ngx-markdown #979

Closed
arora-kushal opened this issue Oct 7, 2019 · 2 comments
Closed
Assignees
Labels
Status: Approved Is ready to be worked on Type: Other Not an enhancement or a bug

Comments

@arora-kushal
Copy link

Describe the bug
Issue 1: Not able to use this library properly with Angular. As you can see in the stackblitz, correct HTML is getting formed but diagram 1 is not generated.
Issue 2: Diagram 2 is getting generated but incorrect (see screenshot below)

To Reproduce
This is not reproducable in stackblitz. Clone this project and run this on your local computer.

Steps to reproduce the behavior:

  1. https://stackblitz.com/edit/angular-markdown-mermaid

Expected behavior
Diagrams should be visible but only mermaid text is visible.

Screenshots
Expected Diagram:
https://mermaidjs.github.io/#/sequenceDiagram
Output Diagram:
image

Additional context
I have also tried to write
import * as mermaid from 'mermaid';
instead of
import mermaid from 'mermaid';
but this is not working as well.

Please suggest.

@arora-kushal arora-kushal added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Oct 7, 2019
@arora-kushal arora-kushal changed the title Not able to run this in Angular 7 Not able to use this properly in Angular 7 Oct 7, 2019
@arora-kushal arora-kushal changed the title Not able to use this properly in Angular 7 Issue with ngx-markdown in Angular 7 along with ngx-markdown Oct 7, 2019
@arora-kushal arora-kushal changed the title Issue with ngx-markdown in Angular 7 along with ngx-markdown Not able to use mermaid properly in Angular 7 along with ngx-markdown Oct 7, 2019
@knsv
Copy link
Collaborator

knsv commented Oct 7, 2019

Add mermaid.init(); below initialize to get the rendering going. Then it should work fine.

@IOrlandoni
Copy link
Member

Sample here.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 7, 2019
@IOrlandoni IOrlandoni added Status: Approved Is ready to be worked on Type: Other Not an enhancement or a bug and removed Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Oct 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Status: Approved Is ready to be worked on Type: Other Not an enhancement or a bug
Projects
None yet
Development

No branches or pull requests

3 participants