Invoked whenever an outlet is created and has been assigned to the table.
()
| 983 | |
| 984 | /** Invoked whenever an outlet is created and has been assigned to the table. */ |
| 985 | _outletAssigned(): void { |
| 986 | // Trigger the first render once all outlets have been assigned. We do it this way, as |
| 987 | // opposed to waiting for the next `ngAfterContentChecked`, because we don't know when |
| 988 | // the next change detection will happen. |
| 989 | // Also we can't use queries to resolve the outlets, because they're wrapped in a |
| 990 | // conditional, so we have to rely on them being assigned via DI. |
| 991 | if ( |
| 992 | !this._hasAllOutlets && |
| 993 | this._rowOutlet && |
| 994 | this._headerRowOutlet && |
| 995 | this._footerRowOutlet && |
| 996 | this._noDataRowOutlet |
| 997 | ) { |
| 998 | this._hasAllOutlets = true; |
| 999 | |
| 1000 | // In some setups this may fire before `ngAfterContentInit` |
| 1001 | // so we need a check here. See #28538. |
| 1002 | if (this._canRender()) { |
| 1003 | this._render(); |
| 1004 | } |
| 1005 | } |
| 1006 | } |
| 1007 | |
| 1008 | /** Whether the table has all the information to start rendering. */ |
| 1009 | private _canRender(): boolean { |
no test coverage detected