/** * Created by ttang on 2016/8/10. */ app.directive('atDeleteLink',["$timeout",function(timer){ return{ restrict: 'A', scope: {}, link: function(scope, element){ timer(function(){ $(".at a").each(function(){ var atText = $(this).text(); $(this).parent().html(atText); }); }) } } }]);