Skip to content

tja4472/ngrx-ionic-angularfire

Repository files navigation

Gadget

Gizmo

Widget

my-firebase-app-config.ts

import { FirebaseAppConfig } from 'angularfire2';

export const MyFirebaseAppConfig: Readonly<FirebaseAppConfig> = {
  apiKey: 'xxxxxx',
  authDomain: 'xxxxxx',
  databaseURL: 'xxxxxx',
  messagingSenderId: 'xxxxxx',
  projectId: 'xxxxxx',
  storageBucket: 'xxxxxx',
};

State

  • auth
    • displayName
    • email
    • error
    • hasChecked
    • isAuthenticated
    • isAuthenticating
    • userId
  • collection
    • loaded
    • loading
    • textItems
      • 0
        • description
        • title
      • 1
        • description
        • title
  • gadget
    • ids
      • 0: "aa"
      • 1: "bb"
    • entities
      • aa
        • description
        • id
        • name
      • bb
        • description
        • id
        • name
    • selectedWidgetId
  • wgizmo
    • ids
      • 0: "aa"
      • 1: "bb"
    • entities
      • aa
        • description
        • id
        • name
      • bb
        • description
        • id
        • name
    • selectedGizmoId
  • widget
    • ids
      • 0: "aa"
      • 1: "bb"
    • entities
      • aa
        • description
        • id
        • name
      • bb
        • description
        • id
        • name
    • selectedWidgetId

ngrx 4.1.1

Actions

Using example-app/book.ts as pattern.

Action doc

Reducers

https://github.com/ngrx/platform/blob/master/example-app/app/auth/reducers/auth.ts

https://github.com/ngrx/platform/blob/master/docs/entity/adapter.md#createentityadapter