Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login controller example at the readme #2220

Closed
YaLehin opened this issue Jun 25, 2020 · 0 comments · Fixed by #2233
Closed

Login controller example at the readme #2220

YaLehin opened this issue Jun 25, 2020 · 0 comments · Fixed by #2233

Comments

@YaLehin
Copy link

YaLehin commented Jun 25, 2020

At the readme, there is an example of authenticating function realization. As this action is the result of submitting the form, then we need to stop default behaviour (reloading page). So, the function must be like

  @action
  async authenticate(ev) {
    ev.preventDefault();
    let { identification, password } = this;
...

Otherwise, the page will be reloaded and response can't be caught.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant