-
Notifications
You must be signed in to change notification settings - Fork 128
Open
Labels
Description
var server = (…) ? 'http://test/' : 'http://production/';
angular.module('myMod', […]).constant('server', server);gives me a Use anonymous functions instead of named function angular/function-type.
I tried with:
angular.module('myMod', […]).constant('server', function () {
return (…) ? 'http://test/' : 'http://production/';
});but that returns the literal function, not the value.
What's the suggested approach here?