Skip to content

Instantly share code, notes, and snippets.

@dmarr
Last active December 16, 2015 15:29
Show Gist options
  • Save dmarr/5456766 to your computer and use it in GitHub Desktop.
Save dmarr/5456766 to your computer and use it in GitHub Desktop.
'use strict';
angular.module('phoenixapp')
.directive('body', function ($route) {
return {
restrict: 'e',
link: function postlink(scope) {
scope.$on('$routechangesuccess', function () {
scope.bodyclasses = $route.current.bodyclasses;
});
}
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment