当前位置:首页 > Web开发 > 正文

[AngularJS] Decorator a directive

2024-03-31 Web开发

use strict .config(function config($provide) { $provide.decorator(ndTrackClickDirective, function diective($delegate) { /**@ngInject */ $delegate[0].compile = function() { // create a new link function return function(scope, el, attr) { /* Your code here*/ }; }; // remove the old link function delete $delegate[0].link; return $delegate; }); });

[AngularJS] Decorator a directive

温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/web/31250.html