Spring code examples. Find the steps to create custom attribute directive. (or, in other words, is the same as the instruction "class='alfa'" in the main template tag). Output. . The content is likely still applicable for all Angular 2 + versions. Directives Overview. directive with 'button[counting]' selector, would be instantiated only on the