на самом деле я следую весеннему учебнику. Придя к Angularjs, он использует .succes
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);
});
});
теперь моя проблема в том, что успех не работает, и после поиска я обнаружил, что методы .success и .error устарели и были удалены из AngularJS 1.6. вместо этого я должен использовать стандартный метод .then. Может ли кто-нибудь преобразовать существующий код в код с помощью метода then? Я пытался, но у меня не получилось, может ли кто-нибудь помочь, пожалуйста, я не знаком с javaScript? Спасибо