Looking at the documentation for angular directives they list valid selectors. https://angular.io/api/core/Directive
- element-name: Select by element name
- .class: Select by class name.
- [attribute]: Select by attribute name.
- [attribute=value]: Select by attribute name and value.
- :not(sub_selector): Select only if the element does not match the sub_selector.
- selector1, selector2: Select if either selector1 or selector2 matches.
But the only selectors that seems to work in a directive for me is 3 and 6.
Here is a stackblitz where I try to select .test css class in a directive and it doesn't work.
https://stackblitz.com/edit/angular-css-class-selector-in-directive
What am I missing?