D
D
DimaPolishuk2016-10-12 13:42:04
JavaScript
DimaPolishuk, 2016-10-12 13:42:04

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

4 answer(s)
S
Sergey Melnikov, 2016-10-12
@mlnkv

Probably you don’t quite understand what less is and how it works, it’s impossible

6
65536, 2016-10-12
@65536

yes
, we send the value of the variable to the server, recompile the loess there, send a new css to the browser
e68556c9d1530e92c8c0cf6c72f2b81d.png

K
Konstantin Kitmanov, 2016-10-13
@k12th

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.

_
_ _, 2016-10-12
@AMar4enko

Do you have less compiled right in the browser, using less.js?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question