Skip to content

Instantly share code, notes, and snippets.

@willrjmarshall
Last active August 29, 2015 13:57
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 willrjmarshall/9774596 to your computer and use it in GitHub Desktop.
Save willrjmarshall/9774596 to your computer and use it in GitHub Desktop.
# If I use active: '$location.path() == contact.path' this fails - can't use expressions?
%tab{heading: "Contact", active: "contact.active"}
= render "shop/shop/contact"
Darkswarm.controller "TabsCtrl", ($scope, $location) ->
$scope.active = (tab)->
$location.path() == tab
$scope.contact =
active: $scope.active("/contact")
# I WANT THE VALUE OF ACTIVE TO UPDATE AUTOMATICALLY
path: "/contact"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment