|
'use strict';
/**
* @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', function ($scope, $rootScope, $famous, $timeline, $location, $route, $timeout, Data) {
console.log('> Loading Text Page')
// Get Page Data
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();
});
}
});
// FadeIn
$timeout(function(){
$scope.showView = true;
},100);
// FadeOut
$scope.fadeOut = function() {
$scope.showView = false;
$timeout(function(){
$scope.showView = false;
$location.path("/");
},800);
}
}]);
|