104
loading...
This website collects cookies to deliver better user experience
interface Action {
type: string;
}
{
type: '[Auth API] Login Success'
}
{
type: '[Login Page] Login',
username: string;
password: string;
}
import { createAction, props } from '@ngrx/store';
export const login = createAction(
'[Login Page] Login',
props<{ username: string; password: string }>()
);
onSubmit(username: string, password: string) {
store.dispatch(login({ username: username, password: password }));
}