From a78bef669d234763f445e93f85c2cba556b79b09 Mon Sep 17 00:00:00 2001 From: Leonardo Merlin Date: Tue, 18 Aug 2015 23:23:06 -0300 Subject: [PATCH] Get image basePath from rootScope --- src/app/components/programa/programa.directive.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/components/programa/programa.directive.js b/src/app/components/programa/programa.directive.js index b623168..8e891b2 100644 --- a/src/app/components/programa/programa.directive.js +++ b/src/app/components/programa/programa.directive.js @@ -6,7 +6,7 @@ .directive('programaBox', programaBox); /** @ngInject */ - function programaBox(api) { + function programaBox($rootScope, api) { /** @ngInject */ function ProgramaController($state, Slug, $log) { @@ -45,7 +45,7 @@ ProgramaController.prototype.getImageUrl = function () { var vm = this; - return api.host + vm.program.image.url; + return $rootScope.basePath + vm.program.image.url; }; ProgramaController.prototype.getImageAlt = function () { -- libgit2 0.21.2