Last active
August 29, 2015 14:22
-
-
Save leongaban/5e187a0c5b7159d18282 to your computer and use it in GitHub Desktop.
temp app.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global angular*/ | |
/** ============================================================================ | |
----------------------------------------------------------------------------- */ | |
/** | |
* Main TickerTags Dashboard App module | |
* @namespace Controller | |
* @desc Injects all modules and controls the $rootScope | |
* @summary "Connecting trending social content to investable companies." | |
* @copyright TickerTags 2015 | |
*/ | |
/** ---------------------------------------------------------------------------- | |
============================================================================= */ | |
(function() { "use strict"; | |
var app = angular.module('tickertags', [ | |
'infinite-scroll', | |
'apiFactory', | |
'scopeFactory', | |
'tagFactory', | |
'tickerFactory', | |
'timeSpanFactory', | |
'overlayDirective', | |
'searchPopoverDirectives', | |
'notificationDirectives', | |
'platformHeaderDirectives', | |
'controlHeaderDirectives', | |
'viewHeaderDirectives', | |
'alertsPanelController', | |
'alertPanelDirectives', | |
'tickersPanelDirectives', | |
'tickersSelectFactory', | |
'tagsPanelDirectives', | |
'tagDetailsFactory', | |
'tagHoverDirective', | |
'tagSearchDirective', | |
'tagsFilterDirective', | |
'focusMeDirective', | |
'chartHeaderController', | |
'chartHeaderDirectives', | |
'chartPanelDirective', | |
'chartIQDirective', | |
'socialMediaController', | |
'socialMediaDirectives', | |
'socialMediaFactory' | |
]) | |
.controller('DashCtrl', Controller); | |
Controller.$inject = [ | |
'$scope', | |
'$rootScope', | |
'ScopeFactory', | |
'TickerFactory']; | |
function Controller($scope, | |
$rootScope, | |
ScopeFactory, | |
TickerFactory) { | |
/** Init DashCtrl scope */ | |
/** ----------------------------------------------------------------- */ | |
var vs = $scope; | |
vs.showNote = true, | |
vs.mouseX = '', | |
vs.mouseY = ''; | |
ScopeFactory.saveScope('root', vs); | |
/** Detect if a tagHover has been shown and ready bodyClick to close */ | |
vs.$on('tagHoverOpen', function(events,data) { | |
vs.bodyClick = function() { | |
$rootScope.$broadcast('bodyClick'); | |
}; | |
}); | |
/** Remove eventListener after tagHover is closed */ | |
vs.$on('destroy', function() { | |
vs.bodyClick = angular.noop(); | |
}); | |
/** Get and store all tickers, eventually just first 100 */ | |
getAllTickers(); | |
function getAllTickers() { | |
TickerFactory.getTickers(); | |
}; | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment