📜  指令 angularjs 中的链接 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:22.384000             🧑  作者: Mango

代码示例1
angular.module('myApp').directive('abc', function($timeout) {
    return {
        restrict: 'EA',
        replace: true,
        transclude: true,
        scope: true,
        link: function(scope, elem, attr) { /* link function */ },
        controller: function($scope, $element) { /* controller function */ }
    };
}