How to use the @ngrx/store.props function in @ngrx/store

To help you get started, we’ve selected a few @ngrx/store examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github johannesjo / super-productivity / src / app / features / note / store / note.actions.ts View on Github external
props<{ notes: Note[] }>(),
);

export const upsertNotes = createAction(
  '[Note] Upsert Notes',
  props<{ notes: Note[] }>(),
);

export const updateNote = createAction(
  '[Note] Update Note',
  props<{ note: Update }>(),
);

export const updateNotes = createAction(
  '[Note] Update Notes',
  props<{ notes: Update [] }>(),
);

export const deleteNote = createAction(
  '[Note] Delete Note',
  props<{ id: string }>(),
);

export const deleteNotes = createAction(
  '[Note] Delete Notes',
  props<{ ids: string[] }>(),
);

export const clearNotes = createAction(
  '[Note] Clear Notes',
);
// Reminder Actions
github devonfw / my-thai-star / angular / src / app / sidenav / store / actions / send-order.actions.ts View on Github external
import { props, createAction, union } from '@ngrx/store';

export const sendOrders = createAction(
  '[SendOrder] Load SendOrders',
  props<{ token: string }>(),
);

export const sendOrdersSuccess = createAction(
  '[SendOrder] Load SendOrders Success',
);

export const sendOrdersFail = createAction(
  '[SendOrder] Load SendOrders Fail',
  props<{ error: string }>(),
);

// action types
const all = union({
  sendOrders,
  sendOrdersSuccess,
  sendOrdersFail,
});
export type SendOrdersAction = typeof all;
github avatsaev / angular-contacts-app-example / src / app / store / actions / ui-actions.ts View on Github external
import {createAction, props} from '@ngrx/store';

export const setCurrentTitle = createAction(
  '[UI] Set current title',
  props<{payload: string}>()
);
github legumeinfo / lis_context_viewer / client / src / app / gene / store / actions / layout.actions.ts View on Github external
import { createAction, props } from '@ngrx/store';

export const OpenLeftSlider = createAction('[Layout] Open Left Slider');
export const CloseLeftSlider = createAction('[Layout] Close Left Slider');
export const ToggleLeftSlider = createAction('[Layout] Toggle Left Slider');
export const ToggleLeftSliderContent = createAction(
  '[Layout] Set Left Slider Content',
  props<{content: string}>()
);
github Verseghy / website_frontend / apps / frontend / src / app / modules / home / state / posts / posts.actions.ts View on Github external
import { createAction, props } from '@ngrx/store'
import { Post } from '../../../../models/Post'

export const loadPosts = createAction('[home] Load posts', props<{ page: number }>())

export const loadPostsSuccess = createAction('[home] Load Posts Success', props<{ posts: Post[] }>())

export const loadPostsFailure = createAction('[Posts] Load Posts Failure', props<{ error: any }>())

export const loadFeaturedPosts = createAction('[home] Load featured posts')

export const loadFeaturedPostsSuccess = createAction('[home] Load featured Posts Success', props<{ posts: Post[] }>())

export const loadFeaturedPostsFailure = createAction('[Posts] Load featured Posts Failure', props<{ error: any }>())
github tomastrajan / angular-ngrx-material-starter / projects / angular-ngrx-material-starter / src / app / features / examples / form / form.actions.ts View on Github external
import { createAction, props } from '@ngrx/store';
import { Form } from './form.model';

export const actionFormUpdate = createAction(
  '[Form] Update',
  props<{ form: Form }>()
);

export const actionFormReset = createAction('[Form] Reset');
github SciCatProject / catanie / src / app / state-management / actions / datasets.actions.ts View on Github external
export const sortByColumnAction = createAction(
  "[Dataset] Sort By Column",
  props<{ column: string; direction: string }>()
);
export const setSearchTermsAction = createAction(
  "[Dataset] Set Search Terms",
  props<{ terms: string }>()
);

export const setArchiveViewModeAction = createAction(
  "[Dataset] Set Archive View Mode",
  props<{ modeToggle: ArchViewMode }>()
);
export const setPublicViewModeAction = createAction(
  "[Dataset] Set Public View Mode",
  props<{ isPublished: boolean }>()
);

export const prefillFiltersAction = createAction(
  "[Dataset] Prefill Filters",
  props<{ values: Partial }>()
);
export const clearFacetsAction = createAction("[Dataset] Clear Facets");

export const setTextFilterAction = createAction(
  "[Dataset] Set Text Filter",
  props<{ text: string }>()
);

export const addLocationFilterAction = createAction(
  "[Dataset] Add Location Filter",
  props<{ location: string }>()
github ngrx / platform / projects / example-app / src / app / books / actions / book.actions.ts View on Github external
import { createAction, props } from '@ngrx/store';

import { Book } from '@example-app/books/models';

export const loadBook = createAction(
  '[Book Exists Guard] Load Book',
  props<{ book: Book }>()
);
github angular-university / ngrx-course / src / app / auth / auth.actions.ts View on Github external
import {Action, createAction, props} from '@ngrx/store';
import {User} from './model/user.model';


export const login = createAction(
  '[Login Page] User Login',
  props<{user:User}>()
)

export const logout = createAction(
  '[Top Menu] User Logout'
);
github devonfw / my-thai-star / angular / src / app / sidenav / store / actions / order.actions.ts View on Github external
props<{ orders: Order[] }>(),
);

export const addOrder = createAction(
  '[Order] Add Order',
  props<{ order: Order }>(),
);

export const addOrders = createAction(
  '[Order] Add Orders',
  props<{ orders: Order[] }>(),
);

export const updateOrder = createAction(
  '[Order] Update Order',
  props<{ order: Update }>(),
);

export const updateOrders = createAction(
  '[Order] Update Orders',
  props<{ orders: Update[] }>(),
);

export const deleteOrder = createAction(
  '[Order] Delete Order',
  props<{ id: string }>(),
);

export const deleteOrders = createAction(
  '[Order] Delete Orders',
  props<{ ids: string[] }>(),
);