I have an environment variable I need use inside some behavior filters.
This variable (value) is set from the backend and in this case for example it's an API link which is different when I develop locally or when I'm testing it on some host.
Of course I can make the var available in the front end view/template, but I don't want to put it some global JS var of course.
Not sure of this is the best way to get that var known in filters?
b.passMethods({
getBehavior: function(){ return b; },
...
getMyVar: function(){ return 'this_is_it'; }
});
or, in case of more vars like this:
var appConfig = {
var1: 'foo',
var2: 'bar',
....
};
b.passMethods({
getBehavior: function(){ return b; },
...
getAppConfig: function(){ return appConfig; }
});
Tips?
Rolf