I have a function in service that is binded to several places (components) in code (path to current displayed img), I'm aware that probably better way would be binding variable and change it when needed, but I would like to know what is faster, better practice:
Declare some constants (I need about 5) inside this function and make these variables declared every change detection cycle runs
OR
Declare them as class variables and use them only in that one function (other parts of service don't need them)