diff --git a/lib/cms.client.service.js b/lib/cms.client.service.js index 57e0ec6..0bf6204 100644 --- a/lib/cms.client.service.js +++ b/lib/cms.client.service.js @@ -4,9 +4,9 @@ angular .module('lnCms') .factory('lnCmsClientService', lnCmsService); -lnCmsService.$inject = ['$http', 'lnCmsConfig', '$log']; +lnCmsService.$inject = ['$http', 'lnCmsConfig']; -function lnCmsService($http, lnCmsConfig, $log) { +function lnCmsService($http, lnCmsConfig) { return { getRoutes: getRoutes, diff --git a/lib/cms.controller.js b/lib/cms.controller.js index 0864334..aebc4e2 100644 --- a/lib/cms.controller.js +++ b/lib/cms.controller.js @@ -57,6 +57,12 @@ function lnCmsController($rootScope, $scope, lnCmsClientService, $urlRouter, $st .getData(endpoint, params) .then(function(response) { vm.view = response.data; + + if ( angular.isArray( vm.view ) && angular.isDefined( vm.view[0].meta ) ) { + vm.meta = vm.view[0].meta; + } else if ( angular.isDefined( vm.view.meta ) ) { + vm.meta = vm.view.meta; + } }); } }