可以使用ngIf和ngSwitch指令将指令嵌套在它们内部的元素上,以便在需要时绑定指令。 例如:
Custom directive on a nested element
或者:
Custom directive on a nested element
Default
上一篇:Angular指令只有在嵌套在*ngIf指令内部时才绑定到元素。
下一篇:angular指令中的compile和link函数分别有什么作用,它们的参数tElement,tAttrs,scope,iElement,iAttrs有何区别和联系?