app.service('fichasReme', function($http) {
	this.getFichasReme = function () {
		return $http.get('json/fichasReme.json').then(function(data) {
			return data.data
		});
		// return [];
	};

	this.getFichaReme = function(idfichareme) {
		return $http.get('json/fichasReme.json').then(function(data) {
			var f = {};
			data.data.forEach(function(fichareme) {
				if(fichareme.idfichareme == idfichareme) f=fichareme;
			});
			return f;
		});
	}

	// //TODO
	// this.setPatrulla;
});
@@ -6,26 +6,22 @@
 ervice('
-f
+F
 ichas
-Reme
 ', funct
@@ -33,180 +33,657 @@
 http
-) %7B%0A%09this.getFichasReme = function () %7B%0A%09%09return $http.get('json/fichasReme.json').then(function(data) %7B%0A%09%09%09return data.data%0A%09%09%7D);%0A%09%09// return %5B%5D;%0A%09%7D;%0A%0A%09this.getFichaReme =
+, $q) %7B%0A  return %7B%0A    all: function(id)%7B%0A      var deferred = $q.defer();%0A      $http%0A        .get('/fichas/'+id)%0A        .then(function (response) %7B%0A          deferred.resolve(response.data);%0A        %7D)%0A        .catch(function (error) %7B%0A          deferred.reject(error);%0A        %7D);%0A        return deferred.promise;%0A    %7D,%0A    new: function (ficha) %7B%0A      var deferred = $q.defer();%0A      $http%0A        .post('/fichas', ficha)%0A        .then(function (response) %7B%0A          deferred.resolve(response.data);%0A        %7D)%0A        .catch(function (error) %7B%0A          deferred.reject(error);%0A        %7D);%0A      return deferred.promise;%0A    %7D,%0A    update:
  fun
@@ -692,266 +692,924 @@
 ion(
-id
 ficha
-reme) %7B%0A%09%09return $http.get('json/fichasReme.json').then(function(data) %7B%0A%09%09%09var f = %7B%7D;%0A%09%09%09data.data.forEach(function(fichareme) %7B%0A%09%09%09%09if(fichareme.idfichareme == idfichareme) f=fichareme;%0A%09%09%09%7D);%0A%09%09%09return f;%0A%09%09%7D);%0A%09%7D%0A%0A%09// //TODO%0A%09// this.setPatrulla;
+) %7B%0A      var deferred = $q.defer();%0A      $http%0A        .put('/fichas', ficha)%0A        .then(function (response) %7B%0A          deferred.resolve(response.data);%0A        %7D)%0A        .catch(function (error) %7B%0A          deferred.reject(error);%0A        %7D);%0A      return deferred.promise;%0A    %7D,%0A    get: function(id) %7B%0A      var deferred = $q.defer();%0A      $http%0A        .get('/fichas/'+id)%0A        .then(function (response) %7B%0A          deferred.resolve(response.data);%0A        %7D)%0A        .catch(function (error) %7B%0A          deferred.reject(error);%0A        %7D);%0A        return deferred.promise;%0A    %7D,%0A    delete: function(id) %7B%0A      var deferred = $q.defer();%0A      $http%0A        .delete('/fichas/'+id)%0A        .then(function (response) %7B%0A          deferred.resolve(response.data);%0A        %7D)%0A        .catch(function (error) %7B%0A          deferred.reject(error);%0A        %7D);%0A        return deferred.promise;%0A    %7D%0A  %7D
 %0A%7D);
+%0A

Update fichasRemeService.js