Created
April 11, 2017 08:41
-
-
Save brakmic/7e85713b7debb23b1b20de219a5a1d89 to your computer and use it in GitHub Desktop.
action creator for customer actions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
import { Action } from '@ngrx/store'; | |
import { ICustomer } from '../../interfaces'; | |
import * as customer from '../customer.actions'; | |
@Injectable() | |
export class CustomerActions { | |
public customerInit() { | |
return new customer.InitCustomerAction(); | |
} | |
public customerInitialized(payload: ICustomer) { | |
return new customer.InitializedCustomerAction(payload); | |
} | |
public customerInitFailed() { | |
return new customer.InitFailedCustomerAction(); | |
} | |
public customerSelected(payload: ICustomer) { | |
return new customer.CustomerSelectedAction(payload); | |
} | |
public customerChanged() { | |
return new customer.CustomerChangedAction(); | |
} | |
public customerDeleted() { | |
return new customer.CustomerDeletedAction(); | |
} | |
public customerSaved(payload: ICustomer) { | |
return new customer.CustomerSavedAction(payload); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment