Simple landing page for my website

nav.js 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. 'use strict';
  2. /**
  3. * @ngdoc function
  4. * @name landingPageApp.controller:MainCtrl
  5. * @description
  6. * # MainCtrl
  7. * Controller of the landingPageApp
  8. */
  9. angular.module('landingPageApp')
  10. .controller('NavCtrl', ['$window', '$scope', '$timeout', "$rootScope", "$state", '$mixpanel', function ($window, $scope, $timeout, $rootScope, $state, $mixpanel) {
  11. // Mixpanel Analytics Tracking
  12. $mixpanel.track('Site Loaded');
  13. $scope.track = function(action){
  14. $mixpanel.track(action);
  15. //console.log("Tracking action with Mixpanel: " + action)
  16. }
  17. // Get Language
  18. var lang = $window.navigator.language || $window.navigator.userLanguage;
  19. if (lang === 'pt-BR') {
  20. //console.log("language is portuguese");
  21. } else {
  22. //console.log("language is english");
  23. }
  24. $scope.logoAnimationStart = false;
  25. $scope.menuAnimationStart = false;
  26. $timeout(function(){
  27. $scope.logoAnimationStart = true;
  28. $timeout(function(){
  29. $scope.menuAnimationStart = true;
  30. }, 500);
  31. }, 500);
  32. }]);