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

Is it possible to import mermaid from component instead of angular.json? #399

Open
jvegaseg opened this issue Jun 20, 2022 · 1 comment
Open

Comments

@jvegaseg
Copy link

I am using ngx-markdown 14.0.0 with mermaid plugin.

If I add "node_modules/mermaid/dist/mermaid.min.js" in scripts of angular.json everything works well, but I would like to load that big file only when my custom angular component loads.

For that I use in the component:

import "node_modules/mermaid/dist/mermaid.min";

but I get the error:

[ngx-markdown] When using the mermaidattribute you *have to* include Mermaid files toangular.json or use imports. See README for more information

The question is, how could I load mermaid script from the component and making ngx-markdown works?

Thanks in advance for your help.

@jvegaseg
Copy link
Author

Any help on this??

I have tried also with

import mermaid from 'mermaid';

but same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant