To allow users of your <my-li> to pass custom content add a <ng-content></ng-content> tag to the template (you can add custom content before and after the <ng-content> tag that should appear for each <my-li> element.@Component( selector: '[myLi]', // '[my-li]', template: '<ng-content></ng-content>' ...) 这篇关于封装&lt; li&gt;的角组件标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-02 01:24