0
AngularJS를 사용하는 다른 지시문 안에 지시문이 있습니다. 호출 된 제목 ({{questions.n3.name}})이 표시되지 않습니다. 여기 AngularJS (지시어 내 지시문)에 제목이 표시되지 않습니다.
내 JS의 :.directive('myRating', function() {
return{
restrict: 'E',
template: '<div><div class="row question">{{questions.n3A.name}}</div> \
<div class="row rating" ng-controller="RatingDemoCtrl"> \
<rating value="rate" max="max" readonly="isReadonly" state-on="\'glyphicon-star rated\'" state-off="\'glyphicon-star\'"></rating> \
<div class="col-md-12"> \
<button class="btn btn-sm btn-danger form-control" ng-click="rate = 0" ng-disabled="isReadonly">Clear</button> \
</div> \
</div> \
</div>',
replace: true,
scope: {
text: '@'
}
};
});
$scope.questions = {
"n3A": {
"name": "How safe did you feel on your trip?",
"ID": "n3A"
},
"n3B": {
"name": "How did you get there?",
"ID": "n3B"
},
};
나는 또한 Pluncker을 만들었습니다. 예 및 남미/아시아/아프리카를 클릭하면 제목이 별 위에 표시됩니다.
내가 누락 된 부분이 있으십니까?