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

video.js 1.2KB

    /** * @ngdoc function * @name domainManagerApp.controller:AboutCtrl * @description * # AboutCtrl * Controller of the domainManagerApp */ angular.module('goApp.video', ['ngFx', 'ngAnimate', 'goApp.data']) .controller('VideoController',['$scope', '$rootScope', '$famous', '$timeline', '$location', '$route', '$timeout', 'Data', function ($scope, $rootScope, $famous, $timeline, $location, $route, $timeout, Data) { 'use strict'; console.log('> Loading Video Page'); // Get Page Data var link = $location.url(); $scope.pageData = Data.getPageData(link); console.log("> Youtube video: " + $scope.pageData.videoUrl); $rootScope.$on('data:loaded', function(data) { if(!$scope.$$phase) { $scope.$apply(function(){ $scope.pageData = Data.getPageData(link); }); } else { $scope.pageData = Data.getPageData(link); } }); // FadeIn $timeout(function(){ $scope.showView = true; },100); // FadeOut $scope.fadeOut = function() { $scope.showView = false; $timeout(function(){ $scope.showView = false; $location.path("/"); },800); }; }]);