text: angular.
  	module('gameList', ["ngStorage"]).
  		component('gameList', {
  			templateUrl: 'game-list/game-list.template.html',
  			controller: ['Game', '$scope','$sessionStorage','$window', function GameListController(Game, $scope, $sessionStorage, $window) {
  				this.games = Game.query();
  				var divs = $('.main-title, .main-heading, .main-line');
  				$(window).on('scroll', function () {
  					var st = $(this).scrollTop();
  					divs.css({ 'opacity' : (1 - st/350) });
  				});
  			}]
  		})
  .directive("owlCarousel", function() {
  	return {
  		restrict: 'E',
  		transclude: false,
  		link: function (scope) {
  			scope.initCarousel = function(element) {
  			  // provide any default options you want
  				var defaultOptions = {
  				};
  				var customOptions = scope.$eval($(element).attr('data-options'));
  				// combine the two options objects
  				for(var key in customOptions) {
  					defaultOptions[key] = customOptions[key];
  				}
  				// init carousel
  				$(element).owlCarousel(defaultOptions);
  			};
  		}
  	};
  })
  .directive('owlCarouselItem', [function() {
  	return {
  		restrict: 'E',
  		transclude: false,
  		link: function(scope, element) {
  		  // wait for the last item in the ng-repeat then call init
  			if(scope.$last) {
  				scope.initCarousel(element.parent());
  			}
  		}
  	};
  
  
  }]);
  
  
  
  
  
  
  