I'm trying to make a simple login form work with an action attribute. The issue here is the request to /login is never sent. Copying and pasting the form in the DOM through the dev tools make the copied one work. Angular seems to prevent the default behavior of the form.
Here is my login form component, very basic:
@Component({
selector: 'my-app',
template: `
<form #f="ngForm" action="/login" method="POST">
Username: <input type="text"required>
<br/>
Password: <input type="password" required>
<br/>
<button type="submit">Login</button>
</form>
`,
directives: [FORM_DIRECTIVES]
})
I also tried to return true
/false
in the ngSubmit
directive's handler but it does not work too.
Here is a plunker illustrating the issue.
Anyone knows how to tell angular to submit the form with the action request ?
angular.2.0.0-Beta.1