Document AppComponent.updateTheme

This commit is contained in:
Yura Bondarenko
2022-06-08 15:34:58 +02:00
parent 03e1e468bd
commit 485cc2bd31

View File

@@ -228,6 +228,12 @@ export class AppComponent implements OnInit, AfterViewInit {
}); });
} }
/**
* Update the theme according to the current route, if applicable.
* @param urlAfterRedirects the current URL after redirects
* @param snapshot the current route snapshot
* @private
*/
private updateTheme(urlAfterRedirects: string, snapshot: ActivatedRouteSnapshot): void { private updateTheme(urlAfterRedirects: string, snapshot: ActivatedRouteSnapshot): void {
this.themeService.updateThemeOnRouteChange$(urlAfterRedirects, snapshot).pipe( this.themeService.updateThemeOnRouteChange$(urlAfterRedirects, snapshot).pipe(
switchMap((changed) => { switchMap((changed) => {