Personal portfolio website for Regina Carvalho. Built with Famous.js library.

page.js 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. 'use strict';
  2. /**
  3. * @ngdoc function
  4. * @name domainManagerApp.controller:AboutCtrl
  5. * @description
  6. * # AboutCtrl
  7. * Controller of the domainManagerApp
  8. */
  9. angular.module('goApp.page', ['ngFx', 'ngAnimate', 'goApp.data'])
  10. .controller('PageController',['$scope', '$rootScope', '$famous', '$timeline', '$location', '$route', '$timeout', 'Data', function ($scope, $rootScope, $famous, $timeline, $location, $route, $timeout, Data) {
  11. console.log('> Loading Text Page')
  12. // Get Page Data
  13. var link = $location.url()
  14. $scope.pageData = Data.getPageData(link);
  15. $rootScope.$on('data:loaded', function(data) {
  16. if(!$scope.$$phase) {
  17. $scope.$apply(function(){
  18. $scope.pageData = Data.getPageData(link);
  19. $scope.showSlider();
  20. });
  21. }
  22. });
  23. // FadeIn
  24. $timeout(function(){
  25. $scope.showView = true;
  26. },100);
  27. // FadeOut
  28. $scope.fadeOut = function() {
  29. $scope.showView = false;
  30. $timeout(function(){
  31. $scope.showView = false;
  32. $location.path("/");
  33. },800);
  34. }
  35. }]);