dhineu-identity
v0.0.19
Published
This library was generated with [Nx](https://nx.dev).
Downloads
235
Readme
dhineu-identity
This library was generated with Nx.
📢 Release Notes
See full release notes in CHANGELOG.md.
Implementation Steps
Step-1
Use the bellow code in the app.config.ts (>= NG 16)
export const appConfig: ApplicationConfig = {
providers: [
provideAnimations(),
{
provide: APP_INITIALIZER,
useFactory: resolveCurrentUser,
deps: [IdentityService, Router],
multi: true,
},
importProvidersFrom(DhnIdentityDirective),
provideRouter(appRoutes),
provideHttpClient(withInterceptors([jwtInterceptor, dhnUnauthorizeInterceptor])),
{ provide: ENVIRONMENT, useValue: environment },
],
};
Step-2
Add the bellow code whereever you want in the Route dictionary (generally it in app.routes.ts) file
{
path: 'home',
data: {
page: 'home',
breadcrumb: 'Home',
},
canActivate: [tokenGuard, routeGuard],
resolve: { user: resolveCurrentUser },
children: []
}
