projects.resolver.ts
angular/examples/week05-06/projects.resolver.ts
// @ts-nocheck
import { inject } from '@angular/core';
import { ResolveFn } from '@angular/router';
import { MetricsService } from './metrics.service';
export const ProjectsResolver: ResolveFn<unknown> = () => {
const metrics = inject(MetricsService);
return metrics.fetchProjects().pipe(
metrics.cacheResponse('projects'),
);
};
Artículos relacionados
server.js
server.js — javascript source code from the angular learning materials (angular/comprehensive-demo/server/server.js).
Leer artículo →app.component.ts
app.component.ts — typescript source code from the angular learning materials (angular/comprehensive-demo/src/app/app.component.ts).
Leer artículo →app.config.ts
app.config.ts — typescript source code from the angular learning materials (angular/comprehensive-demo/src/app/app.config.ts).
Leer artículo →app.routes.ts
app.routes.ts — typescript source code from the angular learning materials (angular/comprehensive-demo/src/app/app.routes.ts).
Leer artículo →auth.guard.ts
auth.guard.ts — typescript source code from the angular learning materials (angular/comprehensive-demo/src/app/core/guards/auth.guard.ts).
Leer artículo →role.guard.ts
role.guard.ts — typescript source code from the angular learning materials (angular/comprehensive-demo/src/app/core/guards/role.guard.ts).
Leer artículo →