projects.actions.ts
angular/examples/week09-10/state/projects.actions.ts
// @ts-nocheck
import { createActionGroup, emptyProps, props } from '@ngrx/store';
import { Project } from './projects.models';
export const ProjectsActions = createActionGroup({
source: 'Projects',
events: {
'Enter Page': emptyProps(),
'Load Requested': props<{ tenantId: string }>(),
'Load Succeeded': props<{ projects: Project[] }>(),
'Load Failed': props<{ error: unknown }>(),
'Upsert Requested': props<{ project: Project }>(),
'Upsert Succeeded': props<{ project: Project }>(),
'Delete Requested': props<{ id: string }>(),
'Delete Succeeded': props<{ id: string }>(),
},
});
Articles liés
server.js
server.js — javascript source code from the angular learning materials (angular/comprehensive-demo/server/server.js).
Lire l'article →app.component.ts
app.component.ts — typescript source code from the angular learning materials (angular/comprehensive-demo/src/app/app.component.ts).
Lire l'article →app.config.ts
app.config.ts — typescript source code from the angular learning materials (angular/comprehensive-demo/src/app/app.config.ts).
Lire l'article →app.routes.ts
app.routes.ts — typescript source code from the angular learning materials (angular/comprehensive-demo/src/app/app.routes.ts).
Lire l'article →auth.guard.ts
auth.guard.ts — typescript source code from the angular learning materials (angular/comprehensive-demo/src/app/core/guards/auth.guard.ts).
Lire l'article →role.guard.ts
role.guard.ts — typescript source code from the angular learning materials (angular/comprehensive-demo/src/app/core/guards/role.guard.ts).
Lire l'article →