first draft
This commit is contained in:
@@ -1,12 +1,25 @@
|
||||
import { ApplicationConfig, provideBrowserGlobalErrorListeners, provideZoneChangeDetection } from '@angular/core';
|
||||
import { ApplicationConfig, provideBrowserGlobalErrorListeners, provideZoneChangeDetection, inject } from '@angular/core';
|
||||
import { provideRouter } from '@angular/router';
|
||||
|
||||
import { routes } from './app.routes';
|
||||
import { provideHttpClient } from '@angular/common/http';
|
||||
import { providePhoenixPluginWithPrimeNG } from '@phx/shared-ui';
|
||||
import { environment } from '../environments/environment';
|
||||
import { apolloProvider } from './apollo.provider';
|
||||
import { AuthGuard } from './auth-guard';
|
||||
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
provideBrowserGlobalErrorListeners(),
|
||||
provideZoneChangeDetection({ eventCoalescing: true }),
|
||||
provideRouter(routes)
|
||||
...providePhoenixPluginWithPrimeNG({ stripTrailingSegments: routes.map(route => route.path).filter(Boolean) as string[] }),
|
||||
provideRouter(routes),
|
||||
provideHttpClient(),
|
||||
...(environment.production ? [] : [
|
||||
...apolloProvider(),
|
||||
{
|
||||
provide: AuthGuard,
|
||||
useFactory: () => new AuthGuard(),
|
||||
},
|
||||
])
|
||||
]
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user