Answer the question
In order to leave comments, you need to log in
Can I change the value of a less variable from within an Angular controller?
Tell me, how can I change the value of the less variable directly from the angular controller?
Answer the question
In order to leave comments, you need to log in
Probably you don’t quite understand what less is and how it works, it’s impossible
yes
, we send the value of the variable to the server, recompile the loess there, send a new css to the browser
You can change the value of css -variable , but IE/Edge is not supported yet.
It is possible in the case described by Alexander Marchenko : if less compiles on the fly. But this is not a very good option for production and in any case will require some kind of strapping.
Now the question is: what the hell? And so you can change any style properties from JS as you like.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question