0
내가 각 공장을 통해 내 데이터베이스에서 데이터를 얻기 위해 노력하고 객체, 다음은 내가 다음 코드
readProduct: function (productId) {
return $http({
method: 'GET',
url: '/api/products/' + productId
}).success(function (data) {
alert("success in read");
console.log(data);
}).error(function (error) {
//Showing error message
alert("failed");
$scope.status = 'Unable to retrieve products' + error.message;
});
},
에게 준 나의 제품 서비스에 내 코드
if (!$scope.isNew) {
productsService
.readProduct($routeParams.id)
.success(function (data, status, headers, config) {
console.log("data in edit " + data);
$scope.person = data;
});
}
입니다
나는 경고 성공을 읽고 콘솔에서 나는 데이터를 얻고있다. 그러나 내가 함수를 호출 한 곳에서 나는 데이터를 얻지 못하고있다. 즉, 내 콘솔에서 "개체 개체 편집"데이터를 가져 오는 중입니다.
시도'을 console.log ((JSON.stringify (데이터));'객체의 내용을 볼 수 있습니다. –
@Aniket no luck : (아직 개체로 표시 중입니다.) – Philomath
@AniketSinha 콘솔에서 캐시 작업을 취소했지만 .. 여전히 내보기에 바인딩되지 않습니다. – Philomath