File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
igniteui-angular/src/lib/services/theme Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 11import { ApplicationConfig } from '@angular/core' ;
2- import { provideRouter } from '@angular/router' ;
2+ import { NavigationError , provideRouter , withNavigationErrorHandler } from '@angular/router' ;
33
44import { routes } from './app.routes' ;
55import { provideClientHydration } from '@angular/platform-browser' ;
66
77export const appConfig : ApplicationConfig = {
8- providers : [ provideRouter ( routes ) , provideClientHydration ( ) ]
8+ providers : [
9+ provideRouter (
10+ routes ,
11+ // force failed routes to throw & fail the SSG part of the build
12+ withNavigationErrorHandler ( ( e : NavigationError ) => { throw e ; } )
13+ ) ,
14+ provideClientHydration ( )
15+ ]
916} ;
Original file line number Diff line number Diff line change @@ -38,8 +38,8 @@ export class ThemeService {
3838 }
3939
4040 private init ( ) {
41- const theme = globalThis
42- . getComputedStyle ( this . document . body )
41+ const theme = globalThis . window
42+ ? .getComputedStyle ( this . document . body )
4343 . getPropertyValue ( "--ig-theme" )
4444 . trim ( ) ;
4545
You can’t perform that action at this time.
0 commit comments