0

I'm trying to have print-styles.scss compiled in css and put into assets folder by angular compiler.

I need it for injecting styles into an iframe that should print some contents.

The problem is that in angular.json

styles: [{
   "input": "projects/public/src/print-styles.scss",
   "lazy": true,
   "bundleName": "print-styles-hello"
}]

results in JS file which I don't know how to use.

I don't want to use any Gulp or other additional tools.

3
  • Can you check this blog may be this will help:codinglatte.com/posts/angular/… Commented Jul 25, 2019 at 8:20
  • @Chellappan I saw it but how can I guess the URL which I have to use? Angular compiles 2 bundles and prefixes them with hashes and targets. Also I don't see any changes on a page. Commented Jul 25, 2019 at 8:22
  • Check this also :stackoverflow.com/questions/46152593/… Commented Jul 25, 2019 at 8:31

1 Answer 1

1

Solved by specifying "extractCss": true which results in a constant expected .css output.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.