title: AngularJS version 1.6 change from `.success` method to `.then` method
body: <p>actually am following a spring tutorial .. coming to Angularjs he is using .succes </p>
  
  <pre><code>var app=angular.module("MyApp",[]);
  .controller("MyController",function($scope,$http){
      $scope.pageProduits=null;
  
      $http.get("http://localhost:8080/chercherProduits?mc")
      .success(function(data){
           $scope.pageProduits=data;
      })
      .error(function(err){
           console.log(err);
      });
  
  });
  </code></pre>
  
  <p>now my problem is that success is not working and after searshing i descovered that The .success and .error methods are deprecated and have been removed from AngularJS 1.6. i have to the standard .then method instead.
  Can someone convert me the existing code to code with the then mothod ? i tried but i failed can anyone helps plz bcz am not familiar with javaScript ? 
  Thank you</p>