title: Get an element by id with Angular service
body: <p>I have a <code>service</code> to get (with array) all post from a server. I need to filter this array by id and show only this post in a single page.</p>
  
  <p>In the service I have this code.</p>
  
  <pre><code>.service('PostAPI', function($http) {
          this.getAll = function() {
              return $http.get("ajax/getAllPosts.php");
          }
          this.getOne = function(data) {
              return $http.get("ajax/searchPost.php?postID=" + data);
          }
          this.delete = function(data) {
              if (confirm("Are you sure to delete this line?")) {
                  return $http.delete("ajax/deletePost.php?postID=" + data);
              }
          }
          this.update = function(data) {
              return $http.put("ajax/updatePost.php?postID" + data);
          }
          this.create = function() {
              return $http.post("ajax/addPost.php");
          }
      })
  </code></pre>
  
  <p>In the controller </p>
  
  <pre><code>.controller("PostControlador", function($scope, $routeParams, PostAPI) {
          GetPost();
          $scope.title = "Editar post";
  
          function GetPost() {
              PostAPI.getOne($routeParams.id).success(function(data) {
                  $scope.post = data;
                  console.log($scope.post);
  
              });
          };
  </code></pre>
  
  <p>In post HTML I have this.</p>
  
  <pre><code>&lt;div&gt;
    &lt;div&gt;{{post.TASK}}&lt;/div&gt;
    &lt;div&gt;{{post.STATUS}}&lt;/div&gt;
    &lt;a href="#/posts/"&gt;&lt;b&gt;Back&lt;/b&gt;&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I'm not able to get any data to show in the page, and also, i have no errors in my console. ¿Any idea?</p>