app/assets/javascripts/sprangular/controllers/header.coffee in sprangular-0.0.1 vs app/assets/javascripts/sprangular/controllers/header.coffee in sprangular-0.1.0
- old
+ new
@@ -1,6 +1,17 @@
-Sprangular.controller "HeaderCtrl", ($scope, $location, Cart, Account, Catalog, Env, Flash, Status, Angularytics) ->
+Sprangular.controller "HeaderCtrl", (
+ $scope,
+ $location,
+ Cart,
+ Account,
+ Catalog,
+ Env,
+ Flash,
+ Status,
+ Angularytics,
+ $translate
+) ->
$scope.cart = Cart
Catalog.taxonomies().then (taxonomies) ->
$scope.taxonomies = taxonomies
$scope.account = Account
@@ -13,10 +24,10 @@
$scope.logout = ->
Account.logout()
.then (content) ->
Angularytics.trackEvent("Account", "Logout")
$scope.$emit('account.logout')
- Flash.success "Successfully logged out"
+ Flash.success 'app.logout_success'
$location.path '/'
$scope.login = ->
$location.path '/sign-in'