MCPcopy Create free account
hub / github.com/angular/components / constructor

Method constructor

src/material/table/table.spec.ts:938–949  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

936 @ViewChild(MatSort) sort!: MatSort;
937
938 constructor() {
939 this.underlyingDataSource.data = [];
940
941 // Add three rows of data
942 this.underlyingDataSource.addData();
943 this.underlyingDataSource.addData();
944 this.underlyingDataSource.addData();
945
946 this.underlyingDataSource.connect().subscribe(data => {
947 this.dataSource.data = data;
948 });
949 }
950
951 ngOnInit() {
952 this.dataSource!.sort = this.sort;

Callers

nothing calls this directly

Calls 2

addDataMethod · 0.45
connectMethod · 0.45

Tested by

no test coverage detected