Chore: Updated resolvers from Class to ResolveFn
This commit is contained in:
@@ -5,7 +5,7 @@ import { ActivatedRouteSnapshot, RouterModule, RouterStateSnapshot, Routes } fro
|
||||
import { AuthGuard } from '../auth/auth-guard.service';
|
||||
|
||||
import { BatchIntegrityReportComponent } from './batch-integrity-report.component';
|
||||
import { BatchIntegrityResolverService } from './batch-integrity-resolver.service';
|
||||
import { batchIntegrityResolver } from './batch-integrity.resolver';
|
||||
|
||||
const batchIntegrityRoutes: Routes = [
|
||||
{
|
||||
@@ -18,7 +18,7 @@ const batchIntegrityRoutes: Routes = [
|
||||
permission: 'Product Ledger',
|
||||
},
|
||||
resolve: {
|
||||
info: () => inject(BatchIntegrityResolverService).resolve(),
|
||||
info: batchIntegrityResolver,
|
||||
},
|
||||
runGuardsAndResolvers: 'always',
|
||||
},
|
||||
@@ -27,6 +27,5 @@ const batchIntegrityRoutes: Routes = [
|
||||
@NgModule({
|
||||
imports: [CommonModule, RouterModule.forChild(batchIntegrityRoutes)],
|
||||
exports: [RouterModule],
|
||||
providers: [BatchIntegrityResolverService],
|
||||
})
|
||||
export class BatchIntegrityReportRoutingModule {}
|
||||
|
||||
Reference in New Issue
Block a user