()
| 92 | private readonly _tabContent = contentChild(TabContent); |
| 93 | |
| 94 | constructor() { |
| 95 | // Connect the panel's hidden state to the DeferredContentAware's visibility. |
| 96 | afterRenderEffect({ |
| 97 | write: () => { |
| 98 | this._deferredContentAware.contentVisible.set(this.visible()); |
| 99 | }, |
| 100 | }); |
| 101 | |
| 102 | // Check for any violations after the DOM has been updated. |
| 103 | if (typeof ngDevMode === 'undefined' || ngDevMode) { |
| 104 | afterRenderEffect({ |
| 105 | read: () => { |
| 106 | const violations: string[] = []; |
| 107 | |
| 108 | if (!this._tabContent()) { |
| 109 | violations.push('ngTabPanel must have an ngTabContent structural directive to render.'); |
| 110 | } |
| 111 | if (!this._tabs._tabMap().has(this.value())) { |
| 112 | violations.push( |
| 113 | `ngTabPanel with value '${this.value()}' does not have a corresponding ngTab.`, |
| 114 | ); |
| 115 | } |
| 116 | |
| 117 | reportViolations(violations, this.element); |
| 118 | }, |
| 119 | }); |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | ngOnInit() { |
| 124 | this._tabs._collection.register(this); |
nothing calls this directly
no test coverage detected