我越來越AngularJS - 無法執行的「元素」「動畫」:部分關鍵幀,不支持
Error: Failed to execute 'animate' on 'Element': Partial keyframes are not supported.
而動畫NG-click方法裏面DOM元素。我使用$ event在ng-click中傳遞DOM參考。
這裏是小提琴鏈接 - fiddle containing issue
$event.currentTarget.animate({
'height': '400px',
'width': '400px'
});
雖然我可以用jQuery的動畫我的DOM元素 - working fiddle
$($event.currentTarget).animate({
'height': '400px',
'width': '400px'
}, 1000);
我不能弄清楚爲什麼它不與工作簡單的角碼。
有你'包括NG-animate'&'jQuery'爲你使用'$'? –
是的,我已經包含了jQuery(不使用ng-animate)來獲得我在第二個小提琴中提到的解決方案。但不是第一個。 –
在角度前使用'angular.element($ event.target)'並加載'jQuery'。 –