How to replace the element with ng-transclude

后端 未结 4 1157
名媛妹妹
名媛妹妹 2021-01-30 17:24

Is it possible to replace the element with ng-transclude on it rather than the entire template element?

HTML:

4条回答
  •  一生所求
    2021-01-30 17:34

    this works in Angular 1.4.9 (and prob earlier too)

    return {
          restrict: 'E',
          replace: true,
          template: '',
          transclude: true,
          link: function (scope, el, attrs) .........
    }
    

提交回复
热议问题