               localStorage.setItem('user_id', tokenDecode.user_id)
               # set header
               Restangular.setDefaultHeaders({Authorization: "JWT "+ auth.token})
+              RestangularV2.setDefaultHeaders({Authorization: "JWT "+ auth.token})
 
               $state.go("candidature.resume")
 



.controller('CivilStatusAdressController', ($rootScope, $q,
            $scope, $state, $filter, ISO3166, Restangular, Upload) ->


    $rootScope.loadInfos($rootScope)

      $scope.save = (model) ->
        console.log($scope.form)
        # save medium
        model_copy = RestangularV2.copy(model)

        if model_copy.picture
          delete model_copy.picture
