Created
May 25, 2020 05:19
-
-
Save Tecayehuatl/ade6563749f1c2d889d27bd639e4f6e4 to your computer and use it in GitHub Desktop.
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 { Component } from '@angular/core'; | |
import { Store } from '@ngrx/store'; | |
import { IAppState } from './store/app.interface'; | |
import { login } from './store/actions/app.actions'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.scss'], | |
}) | |
export class AppComponent { | |
title = 'ngrx-store-walkthrough'; | |
constructor(private store: Store<IAppState>) {} | |
login(): void { | |
this.store.dispatch(login({ usernamae: 'username', password: 'password' })); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment