Pony.fm/public/scripts/app/controllers/application.coffee

16 lines
534 B
CoffeeScript
Raw Normal View History

2013-07-25 23:33:04 +02:00
angular.module('ponyfm').controller "application", [
'$scope', 'auth', '$location', 'upload', '$state', '$stateParams', 'taxonomies'
($scope, auth, $location, upload, $state, $stateParams, taxonomies) ->
$scope.auth = auth.data
$scope.$state = $state
$scope.$stateParams = $stateParams
$scope.logout = () ->
auth.logout().done -> location.reload()
$scope.isActive = (loc) -> $location.path() == loc
$scope.$on '$viewContentLoaded', () -> window.handleResize()
# Show loading screen here?
taxonomies.refresh()
]