member_webapp/@overflow/member/container/member-signup-container.component.ts

31 lines
650 B
TypeScript
Raw Normal View History

2018-05-28 05:41:56 +00:00
import {
Component,
OnDestroy,
OnInit,
} from '@angular/core';
import { Member } from '@overflow/commons-typescript/model/member';
2018-05-28 06:24:29 +00:00
import { Store } from '@ngrx/store';
2018-05-28 05:41:56 +00:00
2018-05-28 11:16:00 +00:00
import * as MemberEntityStore from '../store/entity/member';
2018-05-28 05:41:56 +00:00
@Component({
selector: 'of-member-signup-container',
2018-05-28 06:24:29 +00:00
templateUrl: './member-signup-container.component.html',
2018-05-28 05:41:56 +00:00
})
export class MemberSignupContainerComponent implements OnInit, OnDestroy {
constructor(
2018-05-28 11:16:00 +00:00
private store: Store<any>,
2018-05-28 05:41:56 +00:00
) { }
ngOnInit() {
}
ngOnDestroy() {
}
onSignup(info: {member: Member, password: string}) {
2018-05-28 11:16:00 +00:00
this.store.dispatch(new MemberEntityStore.Signup(info));
2018-05-28 05:41:56 +00:00
}
}