이 오류의 원인이 무엇인지 모르겠지만 linq 쿼리와 같은 명령문을 사용하여 결과를 반환하려고 시도하고 있습니다. 각 위치에 대해 모든 사용자를 확보하십시오.Uncaught TypeError : 'Where'of undefined 메서드를 호출 할 수 없습니다.
LINQ 함께 Enumerable에서
var getList = function() {
Ajax.Get({
Url: ...,
DataToSubmit: {id: properties.Id },
DataType: "json",
OnSuccess: function (roleData, status, jqXHR) {
// bind role types
bindModel(roleData);
console.log("roles:", roleData.length);
Ajax.Get({
Url: ....,
DataToSubmit: { pageNumber: 1, id: properties.Id },
DataType: "json",
OnSuccess: function (userData, status, jqXHR) {
console.log("users", userData.length);
var results = linq.From(roleData.RoleTypes)
.ForEach(userData.Users)
.Where('x => x.ContentRole == "' + roleData.ContentRole + '"').Any();
console.log(results);
})
})
오류입니다 :
var results = linq.From(roleData.RoleTypes)
.ForEach(userData.Users)
.Where('x => x.ContentRole == "' + roleData.ContentRole + '"').Any();
오류 메시지 : 캐치되지 않는 예외 (JS) : catch되지 않은 형식 오류 : '어디'정의되지 않은
'linq.js'라고 생각하나요? –
@GetArnold 네, 맞습니다. – Masriyah