0
나는이와 스프링 엔드 포인트에 게시하기 위해 노력하고있어 초기화되고 - 그러나백본보기는 아약스에 전화
_checkForInfiniteScrolling:=>
query = @options.query
scrollElement = @searchResultContainerElem[0]
prog = (scrollElement.scrollTop + scrollElement.offsetHeight)/scrollElement.scrollHeight
if (prog > 0.8) and [email protected] and scrollElement.scrollTop > 0
console.log("hitting ajax")
@getMoreResults(query)
getMoreResults:(query)=>
longitude = query.get("longitude")
latitude = query.get("latitude")
if (longitude!="" && latitude !="")
@findMoreLocationPlates(query)
else
@findMorePartialPlates(query)
findMorePartialPlates:(query)=>
console.log("in find more partial plates")
$.ajax({
type: 'POST',
data: query,
url: "someUrl"
success: @_appendNewResults
})
를, 그것은 다른 모델에 존재하는이 함수를 호출 -
loadSearchHistory:=>
console.log("load search being called")
$.ajax({
type: 'GET',
url: "anotherUrl",
success:@_searchHistoryLoaded
});
_searchHistoryLoaded:(data)=>
console.log("wtf?")
searchHistoryView = new SearchHistory(pastSearches:data)
을 이상한 일은 _searchHistoryLoaded가 호출되고 loadSearchHistory가 호출되는 것입니다. _searchHistoryLoaded가 다른 함수에서 호출되지 않기 때문에 결코 발생하지 않아야합니다. 사람이, 그것뿐만 아니라 감사하겠습니다 디버깅하는 방법에 대한 조언을이 문제를 해결하기 위해 일반적으로 인정 하듯이, 그것은 아마도 어려운
PlateSearchQuery._searchHistoryLoaded (-search.js:78)
(anonymous function) (-search-results.js:4)
jQuery.extend.param.add (jquery-1.7.1.js:7601)
buildParams (jquery-1.7.1.js:7658)
jQuery.extend.param (jquery-1.7.1.js:7621)
jQuery.extend.ajax (jquery-1.7.1.js:7467)
handleAjax (jquery.mockjax.js:469)
PlateResultsView.findMorePartialPlates (-search-results.js:227)
(anonymous function) (-search-results.js:4)
PlateResultsView.getMoreResults (-search-results.js:221)
(anonymous function) (-search-results.js:4)
PlateResultsView._checkForInfiniteScrolling (-search-results.js:210)
(anonymous function) (-search-results.js:4)
jQuery.event.dispatch (jquery-1.7.1.js:3256)
$event.dispatch (jquery.event.drag-2.2.js:374)
jQuery.event.add.elemData.handle.eventHandle (jquery-1.7.1.js:2875)
-
수 있도록하려면,이 오류의 스택입니다.
편집 -
은 추적과 실수를 - 내가 지금은 CONSOLE.LOG에서 나는 경우가 호출 스택 올려 한
더 자세히 확인하십시오. – praks5432