ngx-test-class
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

test-classname-directive

Angular directive for adding a classname to the element that can be used for testing purposes

Usage

Use tstClass [suffix]="<your-suffix>" directive to add tst-<tagName>-<innertext>-<suffix> to the classnames of the element

Example

  • <button tstClass>add</button> is the same as <button class="tst-button-add">add</button>
  • <button tstClass [suffix]="'01'">add</button> is the same as <button class="tst-button-add-01">add</button>
  • <table tstClass><tr>...</tr></table> is the same as <table class="tst-table"><tr>...</tr></table>
  • <table tstClass [suffix]="'01'"><tr>...</tr></table> is the same as <table class="tst-table-01"><tr>...</tr></table>

Package Sidebar

Install

npm i ngx-test-class

Weekly Downloads

3

Version

0.0.1

License

MIT

Unpacked Size

22.3 kB

Total Files

16

Last publish

Collaborators

  • thomasduchatelet