Skip to content

Commit

Permalink
Fixed #13880 - Fix documentation theme switch
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Oct 14, 2023
1 parent 4be917b commit 386092d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Location } from '@angular/common';
import { ChangeDetectionStrategy, Component, Input, OnInit, ViewContainerRef } from '@angular/core';
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit, ViewContainerRef } from '@angular/core';
import { Router } from '@angular/router';
import { Subscription } from 'rxjs';
import { AppConfig } from 'src/app/showcase/domain/appconfig';
Expand Down Expand Up @@ -36,13 +36,14 @@ export class AppDocApiTable implements OnInit {

subscription: Subscription;

constructor(public viewContainerRef: ViewContainerRef, public router: Router, public location: Location, public configService: AppConfigService) {}
constructor(public viewContainerRef: ViewContainerRef, public router: Router, public location: Location, public configService: AppConfigService, private cd: ChangeDetectorRef) {}

ngOnInit() {
this.config = this.configService.config;

this.subscription = this.configService.configUpdate$.subscribe((config) => {
this.config = config;
this.cd.markForCheck();
});
}

Expand Down

0 comments on commit 386092d

Please sign in to comment.