How to replace the element with ng-transclude

后端 未结 4 1158
名媛妹妹
名媛妹妹 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:38

    If you don't have to support IE and Edge you can use display:contents in your css. That will destroy the wrapper on the level of css.

    You can read more about this new display propertie here: https://css-tricks.com/get-ready-for-display-contents/

    Current browser support (hope to see Edge support in the future): https://caniuse.com/#feat=css-display-contents

提交回复
热议问题