안녕하세요 저는 다음과 같은 옵션과 조롱이 있습니다지시문에 겨-GRD에서 selectedItems를 액세스
$ scope.mySourceSelections = [];
$scope.gridOptions = {
data: 'formatSources',
showSelectionCheckbox: true,
enableCellSelection: true,
enableRowSelection: true,
multiSelect: false,
selectedItems: $scope.mySourceSelections
};
내 지시어에는 내 페이지에 HTML을 삽입 할 수있는 템플릿이 있습니다.
data-activity-source={{mySourceSelections}}
페이지 속성이 생산 렌더링 : 내 div 태그에서 내가 속성이 data-activity-source="College of Letters & Science"
을 할 data-activity-source="[{"SourceName":"College of Letters & Science"}]"
소스를 설정하기를, 나는 구문이 필요합니다.
내 템플릿으로 변경
:data-activity-source={{mySourceSelections[0].SourceName}}
나는 다음과 같은 두 가지 오류가 나타납니다
GET /api/v1/activity/public?s=0&l=1&o=College%20of%20Letters%20&%20Science 400 (Bad Request) jquery-1.11.1.min.js?v=1412791216854:4
ERROR: getPublicActivitiesForSource : ajax : error
내가 mySourceSelections의 [0] 인덱스에 액세스 할 때이 발생하는 것을 알고있다. 이 문제를 해결하고 "College of Letters & Science"의 SourceName 값에 액세스 할 수 있습니까?
요청 형식을 어떻게 지정 하시겠습니까? API에 원하는 호출의 예를 들려 줄 수 있습니까? –