AngularJS - directive scope not setting ng-class on element

一个人想着一个人 提交于 2019-12-08 03:11:25

I am not sure if you still need an answer, but I might have fixed your plunk.

Inside the CurrentFolder controller, add

$scope.dndElemClass  = '';

Then wrap $scope.dndElemClass inside $apply.

$scope.$apply(function() { $scope.dndElemClass = 'on-drag-enter'; });

Check the complete plunk for a clearer picture.

try to set class in scope then use class={{classVariable}} !!! This works for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!