(function() {
  'use strict';

  function manageDojoEventsCtrl($scope, $stateParams, $location) {

    var dojo = {
      id: $stateParams.dojoId
    };

    $scope.createEvent = function() {
      $location.path('/dashboard/dojo/' + dojo.id + '/event-form');
    };
  }

  angular.module('cpZenPlatform')
    .controller('manage-dojo-events-controller', ['$scope', '$stateParams', '$location', manageDojoEventsCtrl]);

})();


(function() {
  'use strict';

  function manageDojoEventsCtrl($scope, $stateParams, $state) {

    var dojoId = $stateParams.dojoId;

    $scope.createEvent = function() {
      $state.go('create-dojo-event', {dojoId: dojoId});
    };
  }

  angular.module('cpZenPlatform')
    .controller('manage-dojo-events-controller', ['$scope', '$stateParams', '$location', manageDojoEventsCtrl]);

})();


Refactor manage dojo events controller
Refactor manage dojo events controller
