Skip to content

Instantly share code, notes, and snippets.

@sirgalleto
Created July 7, 2015 19:40
Show Gist options
  • Save sirgalleto/0b01d540b6ea4249e954 to your computer and use it in GitHub Desktop.
Save sirgalleto/0b01d540b6ea4249e954 to your computer and use it in GitHub Desktop.
Filter base url + static
(function(){
angular
.module('evaluon')
.value('imgUrlBase', 'http://186.154.240.187:1045')
.filter('image', image);
function image(imgUrlBase) {
return function(img){
return '{0}/{1}'.format(imgUrlBase, img);
};
}
})();
@sirgalleto
Copy link
Author

Example

{{data.image | image}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment