1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- * @ngdoc function
- * @name domainManagerApp.controller:AboutCtrl
- * @description
- * # AboutCtrl
- * Controller of the domainManagerApp
- */
- angular.module('goApp.page', ['ngFx', 'ngAnimate', 'goApp.data'])
- .controller('PageController',['$scope', '$rootScope', '$famous', '$timeline', '$location', '$route', '$timeout', 'Data', '$mixpanel', function ($scope, $rootScope, $famous, $timeline, $location, $route, $timeout, Data, $mixpanel) {
- 'use strict';
- console.log('> Loading Text Page');
-
- var link = $location.url();
- $scope.pageData = Data.getPageData(link);
- $rootScope.$on('data:loaded', function(data) {
- if(!$scope.$$phase) {
- $scope.$apply(function(){
- $scope.pageData = Data.getPageData(link);
- $scope.showSlider();
- $mixpanel.track('Page View', { "Page": $scope.pageData.link });
- });
- }
- });
-
- $timeout(function(){
- $scope.showView = true;
- },100);
-
- $scope.fadeOut = function() {
- $scope.showView = false;
- $timeout(function(){
- $scope.showView = false;
- $location.path("/");
- },800);
- };
- }]);
|