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

contact.js 1.4KB

    /** * @ngdoc function * @name domainManagerApp.controller:AboutCtrl * @description * # AboutCtrl * Controller of the domainManagerApp */ angular.module('goApp.contact', ['ngFx', 'ngAnimate', 'goApp.data', 'mandrill']) .controller('ContactController',['$scope', '$rootScope', '$famous', '$timeline', '$location', '$route', '$timeout', 'Data', 'Mandrill', '$mixpanel', function ($scope, $rootScope, $famous, $timeline, $location, $route, $timeout, Data, Mandrill, $mixpanel) { 'use strict'; console.log('> Loading Contact Page'); $mixpanel.track('Page View', { "Page": "Contact" }); // 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(); }); } }); $scope.sendMessage = function(msgData){ console.log("> Sending message from " + msgData.name) Mandrill.sendMail(msgData); $mixpanel.track('Messsage Sent', { "Name": msgData.name, "email": msgData.email }); } // FadeIn $timeout(function(){ $scope.showView = true; },100); // FadeOut $scope.fadeOut = function() { $scope.showView = false; $timeout(function(){ $scope.showView = false; $location.path("/"); },800); }; }]);