()
| 486 | } |
| 487 | |
| 488 | private _checkTreeControlUsage() { |
| 489 | if (typeof ngDevMode === 'undefined' || ngDevMode) { |
| 490 | // Verify that Tree follows API contract of using one of TreeControl, levelAccessor or |
| 491 | // childrenAccessor. Throw an appropriate error if contract is not met. |
| 492 | let numTreeControls = 0; |
| 493 | |
| 494 | if (this.treeControl) { |
| 495 | numTreeControls++; |
| 496 | } |
| 497 | if (this.levelAccessor) { |
| 498 | numTreeControls++; |
| 499 | } |
| 500 | if (this.childrenAccessor) { |
| 501 | numTreeControls++; |
| 502 | } |
| 503 | |
| 504 | if (!numTreeControls) { |
| 505 | throw getTreeControlMissingError(); |
| 506 | } else if (numTreeControls > 1) { |
| 507 | throw getMultipleTreeControlsError(); |
| 508 | } |
| 509 | } |
| 510 | } |
| 511 | |
| 512 | /** Check for changes made in the data and render each change (node added/removed/moved). */ |
| 513 | renderNodeChanges( |
no test coverage detected