How do you access Angular scss variables in typescript?

Jus10 picture Jus10 · Mar 23, 2017 · Viewed 17.9k times · Source

I'm trying to access the theme colors from other places in my app. I can access primary, accent, and warn on material elements using color="primary" but sometimes color isn't an option, like when I want to access the colors programatically. Anyone know how to access the theme variables in other places? I think, more specifically, I'm trying to use an scss variable in either typescript, or a css style, whatever gets the job done, but just get errors when I try to use the variables.

Answer

ramden picture ramden · Mar 23, 2017

Please have a look at this question:

access SASS values ($colors from variables.scss) in Typescript (Angular2 ionic2)

Does this solve your problem?