Skip to content

Commit

Permalink
Remove unused loading of SVG icons directly from resource URL
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterEvarior committed Dec 19, 2024
1 parent 4da4bbf commit 48ccbc5
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions frontend/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,9 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { MatIconRegistry } from '@angular/material/icon';
import { DomSanitizer } from '@angular/platform-browser';

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class AppComponent {
readonly PATH_PREFIX = '../assets/icons/';
constructor(
private matIconRegistry: MatIconRegistry,
private domSanitizer: DomSanitizer,
) {
this.matIconRegistry.addSvgIcon(
'pz-search',
this.domSanitizer.bypassSecurityTrustResourceUrl(this.PATH_PREFIX + 'search-icon.svg'),
);
this.matIconRegistry.addSvgIcon(
'pz-menu-icon',
this.domSanitizer.bypassSecurityTrustResourceUrl(this.PATH_PREFIX + 'three-dot-menu-icon.svg'),
);
}
}
export class AppComponent {}

0 comments on commit 48ccbc5

Please sign in to comment.