Skip to content

Instantly share code, notes, and snippets.

View vinicius91's full-sized avatar

Vinicius Rodrigues vinicius91

  • Barcelona, Spain
View GitHub Profile
@vinicius91
vinicius91 / action.js
Last active July 31, 2019 16:56
Basic Store Structure
import { getCharacters, getFilteredCharacters } from "../service";
export const characterActionTypes = {
FETCH_CHARACTER_START: "FETCH_CHARACTER_START",
FETCH_CHARACTER_SUCCESS: "FETCH_CHARACTER_SUCCESS",
FETCH_CHARACTER_ERROR: "FETCH_CHARACTER_ERROR"
};
// Action Creators
import { Component, OnInit } from '@angular/core';
import { Recipient } from './model';
import { GetRecipientStart } from './store';
import {
recipientLoading,
selectAllRecipient
} from './store/recipient.selector';
import { Observable } from 'rxjs';
import { MatTableDataSource } from '@angular/material';
import { select, Store } from '@ngrx/store';