diff --git a/src/material-experimental/mdc-table/text-column.ts b/src/material-experimental/mdc-table/text-column.ts
index d616a3a2fa76..f43ec85078b5 100644
--- a/src/material-experimental/mdc-table/text-column.ts
+++ b/src/material-experimental/mdc-table/text-column.ts
@@ -8,7 +8,6 @@
import {CdkTextColumn} from '@angular/cdk/table';
import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';
-import {_MAT_TEXT_COLUMN_TEMPLATE} from '@angular/material/table';
/**
* Column that simply shows text content for the header and row cells. Assumes that the table
@@ -21,7 +20,16 @@ import {_MAT_TEXT_COLUMN_TEMPLATE} from '@angular/material/table';
*/
@Component({
selector: 'mat-text-column',
- template: _MAT_TEXT_COLUMN_TEMPLATE,
+ template: `
+
+
+ {{headerText}}
+ |
+
+ {{dataAccessor(data, name)}}
+ |
+
+ `,
encapsulation: ViewEncapsulation.None,
// Change detection is intentionally not set to OnPush. This component's template will be provided
// to the table to be inserted into its view. This is problematic when change detection runs since
diff --git a/src/material/table/text-column.ts b/src/material/table/text-column.ts
index c970f193ee24..f43ec85078b5 100644
--- a/src/material/table/text-column.ts
+++ b/src/material/table/text-column.ts
@@ -9,17 +9,6 @@
import {CdkTextColumn} from '@angular/cdk/table';
import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';
-export const _MAT_TEXT_COLUMN_TEMPLATE = `
-
-
- {{headerText}}
- |
-
- {{dataAccessor(data, name)}}
- |
-
-`;
-
/**
* Column that simply shows text content for the header and row cells. Assumes that the table
* is using the native table implementation (`
`).
@@ -31,7 +20,16 @@ export const _MAT_TEXT_COLUMN_TEMPLATE = `
*/
@Component({
selector: 'mat-text-column',
- template: _MAT_TEXT_COLUMN_TEMPLATE,
+ template: `
+
+
+ {{headerText}}
+ |
+
+ {{dataAccessor(data, name)}}
+ |
+
+ `,
encapsulation: ViewEncapsulation.None,
// Change detection is intentionally not set to OnPush. This component's template will be provided
// to the table to be inserted into its view. This is problematic when change detection runs since
diff --git a/tools/public_api_guard/material/table.d.ts b/tools/public_api_guard/material/table.d.ts
index 2c1ad2b23a67..6af3bc69ba87 100644
--- a/tools/public_api_guard/material/table.d.ts
+++ b/tools/public_api_guard/material/table.d.ts
@@ -1,5 +1,3 @@
-export declare const _MAT_TEXT_COLUMN_TEMPLATE = "\n \n \n {{headerText}}\n | \n \n {{dataAccessor(data, name)}}\n | \n \n";
-
export declare class _MatTableDataSource extends DataSource {
_renderChangesSubscription: Subscription | null;
get data(): T[];