#StackBounty: #angular #lazy-loading #codemirror Where do I put imports that would normally go in main.ts, when I am doing lazy module …

Bounty: 100

In my Angular app, I would like to use the library CodeMirror inside a Lazily Loaded module.

The trouble I am having is that the CodeMirror documentation tell me to

In your main.ts or at the root of your application, see documentation:

import 'codemirror/mode/javascript/javascript';
import 'codemirror/mode/markdown/markdown';

Import the base css file and your

@import '~codemirror/lib/codemirror'; @import '~codemirror/theme/material';

However I would prefer this code NOT be imported throughout my app since it is only used by one lazy module.

What can I do so that this is imported correctly only when needed?

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.