DEV Community

Discussion on: Dark Theme for your Angular app

Collapse
 
jdgamble555 profile image
Jonathan Gamble

Never post code as images, it is a pain in the butt for everyone to copy it, use it, etc. Also, you should never use the document object directly since apps need to use SSR.

@Inject(DOCUMENT) private document: Document

Use this in the constructor.

That being said, great code, it helped a lot.

J