이것은 내 controller.js 코드입니다.
$scope.animatt = 900;
그리고 이것은 내 HTML 코드입니다.
<div id="properties" data-{{animatt}}="left:100%;top:10%;">
<h2>all numeric properties</h2>
</div>
'data-{{animatt}}'로 'data-900 ='을 설정하고 싶지만이 코드는 작동하지 않습니다.
컨트롤러에서 다음 코드를 추가하십시오.
var el =angular.element('#properties');
el.attr('data-' + $scope.animatt, 'left:100%;top:10%;');
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다