After browsing through the @angular/cdk code on GitHub, I came across a puzzling "docs-private" comment. Can anyone explain its significance to me?
https://i.sstatic.net/Z47Xb.png
* In this base class for CdkHeaderRowDef and CdkRowDef, the columns inputs are checked for changes and the table is notified.
*/
@Directive()
export abstract class BaseRowDef implements OnChanges {
/** The columns to be displayed on this row. */
columns: Iterable<string>;
/** Differ used to check if any changes were made to the columns. */
protected _columnsDiffer: IterableDiffer<any>;
constructor(
/** @docs-private */ public template: TemplateRef<any>,
protected _differs: IterableDiffers,
) {}
ngOnChanges(changes: SimpleChanges): void {
// Create a new columns differ if one does not yet exist. Initialize it based on initial value
// of the columns property or an empty array if none is provided.
if (!this._columnsDiffer) {
const columns = (changes['columns'] && changes['columns'].currentValue) || [];
this._columnsDiffer = this._differs.find(columns).create();
this._columnsDiffer.diff(columns);
}
}