diff --git a/src/app/components/programa/programa.directive.js b/src/app/components/programa/programa.directive.js index 52fca5e..f4f6fa0 100644 --- a/src/app/components/programa/programa.directive.js +++ b/src/app/components/programa/programa.directive.js @@ -9,10 +9,11 @@ function programaBox($rootScope) { /** @ngInject */ - function ProgramaController($state, Slug, $log) { + function ProgramaController(ArticleService, $state, Slug, $log) { $log.debug('ProgramaController'); var vm = this; + vm.ArticleService = ArticleService; vm.$state = $state; vm.Slug = Slug; vm.$log = $log; @@ -27,6 +28,8 @@ vm.program.slug = vm.Slug.slugify(vm.program.title); } + vm.displayType = vm.display; + // if(vm.program.color && !vm.program.bgColor){ // // 15% more darker // vm.program.colorDarker = window.ColorLuminance(vm.program.color, 0.15); @@ -79,10 +82,18 @@ ProgramaController.prototype.showContent = function () { var vm = this; - vm.$log.info('showContent'); + vm.$state.go('programa-conheca', { + slug: vm.program.slug + }, { + location: true + }); + }; + + ProgramaController.prototype.showPreview = function () { + var vm = this; + vm.$state.go('programa', { - slug: vm.program.slug, - program: vm.program + slug: vm.program.slug }, { location: true }); diff --git a/src/app/components/programa/programa.html b/src/app/components/programa/programa.html index fb8173d..2a1f8bc 100644 --- a/src/app/components/programa/programa.html +++ b/src/app/components/programa/programa.html @@ -1,5 +1,5 @@