choosetoggle.js

angular.module('homepage').
directive('choosetoggle', function() {
  return {
    link: chosenLinker,
    restrict: 'A',
    replace: false
  }

  function chosenLinker(scope, element, attribute) {
    element.bind('click', function() {
        this.classList.toggle('chosen');
    })
  }
});