@Directive requires a CSS selector to identify the HTML in the template that is associated with our directive. The CSS selector for an attribute is the attribute name in square brackets .3. all elements in the template that have an attribute named myHighlight.
文檔上寫的很清楚:
應該是在目前模板找所有符合這個選擇器的元素,很耗資源是你感覺的。其實跟jquery的選擇器沒什麼兩樣。