Skip to content

Instantly share code, notes, and snippets.

@sethetter
Last active December 25, 2015 08:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sethetter/6946044 to your computer and use it in GitHub Desktop.
Save sethetter/6946044 to your computer and use it in GitHub Desktop.
'use strict';
angular.module( 'catalogApp' )
.controller( 'CatalogCtrl', [ '$scope', '$timeout', 'Session', '$location', 'Catalogs',
function( $scope, $timeout, Session, $location, Catalogs ) {
//if (!Session.user) $location.path('/login');
Session.user = {
"defaultCatalog": 0
};
Catalogs.find( Session.user.defaultCatalog ).then( function( catalog ) {
$scope.catalog = catalog;
} );
}
] );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment