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

simplemde.min.css not getting injected in Angular 5.1 #11

Closed
dzervas opened this issue Dec 11, 2017 · 7 comments
Closed

simplemde.min.css not getting injected in Angular 5.1 #11

dzervas opened this issue Dec 11, 2017 · 7 comments

Comments

@dzervas
Copy link

dzervas commented Dec 11, 2017

I just import the module and use it inside a component. The CSS does not get injected (so the view is
completely broken).
I import SimplemdeModule.forRoot() inside the module that has my component.

What info do you need to help me debug this?

EDIT: I added "../node_modules/simplemde/dist/simplemde.min.css" to my angular-cli.json and it works, but I don't like this approach.

@doxiaodong
Copy link
Owner

use webpack: style-loader!css-loader

@dzervas dzervas closed this as completed Dec 11, 2017
@doxiaodong
Copy link
Owner

doxiaodong commented Dec 12, 2017

If you use angular-cli, you can add style-loader!css-loader as pug-loader in angular/angular-cli#1886.

@sjml
Copy link

sjml commented Dec 26, 2017

@doxiaodong Could you clarify what you mean by that comment? You link to a pretty long Issue thread, and it's not clear which part of it is meant to be relevant. Do we need to use pug-loader if we're using angular-cli, or are you saying to do something similar to what they do with pug-loader?

@doxiaodong
Copy link
Owner

yep, add style-loader!css-loader as just like pug-loader usage in the issue.

@vixson
Copy link

vixson commented Oct 5, 2018

yep, add style-loader!css-loader as just like pug-loader usage in the issue.

Please, how to add style-loader!css-loader to the webpack.

Because I don't think angular 5 have the webpack.config.js file anymore.

Please, it would be very helpful if an example is given on how to add the css loader. (demo link or Stackblitz)

@doxiaodong
Copy link
Owner

doxiaodong commented Oct 7, 2018

you can use https://github.com/doxiaodong/ng2-simplemde#style . and add 'simplemde.min.css' to angular-cli config
I don't know how to implement with angular-cli with loader

@vixson
Copy link

vixson commented Oct 9, 2018

you can use https://github.com/doxiaodong/ng2-simplemde#style . and add 'simplemde.min.css' to angular-cli config
I don't know how to implement with angular-cli with loader

Yeah, I think that's the best way. Thanks a lot @doxiaodong

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

4 participants