fix(docs-infra): remove redundant `MatIcon` element (#42584)

Previously, we included a dummy `MatIcon` element in `AppComponent` in
order to ensure that the `Material Icons` font would be requested (and
thus cached by the ServiceWorker) on every navigation. However, #41129
introduced the `ThemeToggleComponent`, which will be present on all
pages (since it is located in the top-menu) and relies on the
`Material Icons` font. Therefore, the work-around for loading the
`Material Icons` font is no longer necessary.

This commit removes the now redundant `MatIcon` from `AppComponent`.

PR Close #42584
This commit is contained in:
George Kalpakas 2021-06-18 11:29:59 +03:00 committed by Dylan Hunn
parent fd8f9ab4e8
commit 29302e3baa
2 changed files with 2 additions and 12 deletions

View File

@ -70,13 +70,3 @@
<footer class="no-print"> <footer class="no-print">
<aio-footer [nodes]="footerNodes" [versionInfo]="versionInfo"></aio-footer> <aio-footer [nodes]="footerNodes" [versionInfo]="versionInfo"></aio-footer>
</footer> </footer>
<!--
Work-around to ensure that the `.woff2` file for the 'Material Icons' font will always be fetched.
This allows the SW to cache the file (even if there are no icons in the current page) and ensure
material icons on other pages are displayed correctly in offline mode.
(Note: Instantiate lazily to avoid affecting the initial rendering.)
-->
<div class="cdk-visually-hidden" *ngIf="!isStarting">
<mat-icon>&nbsp;</mat-icon>
</div>

View File

@ -3,7 +3,7 @@
"master": { "master": {
"uncompressed": { "uncompressed": {
"runtime-es2017": 4619, "runtime-es2017": 4619,
"main-es2017": 456646, "main-es2017": 456422,
"polyfills-es2017": 55210, "polyfills-es2017": 55210,
"styles": 69324, "styles": 69324,
"light-theme": 79417, "light-theme": 79417,
@ -15,7 +15,7 @@
"master": { "master": {
"uncompressed": { "uncompressed": {
"runtime-es2017": 4619, "runtime-es2017": 4619,
"main-es2017": 456785, "main-es2017": 456561,
"polyfills-es2017": 55348, "polyfills-es2017": 55348,
"styles": 69324, "styles": 69324,
"light-theme": 79417, "light-theme": 79417,