/// <reference path="~/Scripts/angular.js" />
(function (app) {
  var StageEditController = function ($scope, stages, $routeParams) {
    StageEditController.$inject = ["$scope", "stages", "$routeParams"];
    var index = $routeParams.index;
    $scope.stageCourant = {};
    angular.copy(stages[index], $scope.stageCourant);
    $scope.mettreAJour = function () {
      angular.copy($scope.stageCourant, stages[index]);
    };
    $scope.abandonner = function () {
      angular.copy(stages[index], $scope.stageCourant);
    };
  };
  app.controller("StageEditController", StageEditController);
}(angular.module("stageModule")));
