1+function () { 2 'use strict'; 3 var controllerId = 'appShell'; 4 angular.module('fullApp').controller(controllerId, 5 ['$rootScope', '$rootElement', 'appCommon', 'config', '$seo', '$loading', '$state', shellController]); 6 7 function shellController($rootScope, $rootElement, appCommon, config, $seo, $loading, $state) { 8 var svm = this; 9 svm.navbar = angular.extend(config.navbar); 10 svm.page = angular.extend(config.page); 11 var activeController; 12 var logSuccess = appCommon.logger.getLogFn(controllerId, 'success'); 13 var loading = new $loading('Please wait ...'); 14 activate(); 15 function activate() { 16 //logSuccess('fullAdmin is loaded!', null, true); 17 appCommon.activateController([], controllerId); 18 } 19 $rootScope.$on(config.events.controllerActivateSuccess, 20 function (event, data) { 21 activeController = data.controller; 22 callSeo(); 23 24 }) 25 $rootScope.$on('$stateChangeSuccess', function (event, toState, toParams, fromState, fromParams) { 26 $rootScope.$params = toParams; 27 }); 28 $rootScope.$on('$stateChangeError', 29 function (event, unfoundState, fromState, fromParams) { 30 event.preventDefault(); 31 //$state.go('error') 32 }); 33 $rootScope.$on('$locationChangeStart', function (event, next, current) { 34 loading.show(); 35 }); 36 $rootScope.$on('$viewContentLoaded', function (event, viewConfig) { 37 activeController && callSeo(); 38 appCommon.$timeout(function () { 39 loading.hide(); 40 angular.element('body').scrollTop(1) 41 }, 0); 42 }); 43 44 45 46 47 function callSeo() { 48 var ac = activeController; 49 if (!ac) 50 ac = {}; 51 var title = ac.viewTitle || ($state.current.title ? $state.current.title == 'auto' ? null : $state.current.title : null) || null; 52 $seo.ivoke(title, ac.metaDescription); 53 } 54 }; 55}();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.