By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
#!/bin/bash | |
# Error handling | |
function OwnError() | |
{ | |
echo -e "[ `date` ] $(tput setaf 1)$@$(tput sgr0)" | |
exit $2 | |
} | |
# Repository for rethinkdb |
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
A complete list of RxJS 5 operators with easy to understand explanations and runnable examples.
@Injectable() | |
export class NgrxStoreService { | |
ondestroy$: Observable<void> = new Subject<void>(); | |
constructor(protected store: Store<State>, protected changeDetector: ChangeDetectorRef) { } | |
select<R>(mapFunc: (state: State) => R): Observable<R> { | |
return this.store.select(mapFunc).pipe( | |
takeUntil(this.ondestroy$), |
import { EntityAdapter, EntityState } from '@ngrx/entity'; | |
import { ActionReducer } from '@ngrx/store'; | |
import { CommandReducer, ReducerCommand } from 'ngrx-command-reducer'; | |
import { BaseAction, StaticAction } from './base.actions'; | |
type PayloadActionFunction<S, P> = (p: P, s: S) => S; | |
type PayloadlessActionFunction<S> = (s: S) => S; | |
export type EntityFunction<S, P> = PayloadActionFunction<S, P> | PayloadlessActionFunction<S>; | |
export class EntityCommandReducer<Entity, State extends EntityState<Entity>, Action extends BaseAction> { |
import {Component, EventEmitter, Type} from '@angular/core'; | |
type MetadataName = 'Input' | 'Output'; | |
interface PropDecoratorFactory { | |
ngMetadataName: MetadataName; | |
bindingPropertyName: string | undefined; | |
} | |
interface PropMetadata { [key: string]: PropDecoratorFactory[]; } |
#!/bin/sh | |
# this goes into /etc/initramfs-tools/scripts/init-premount/a_enable_wireless | |
PREREQ="" | |
prereqs() | |
{ | |
echo "$PREREQ" | |
} | |
case $1 in | |
prereqs) |