I just realized that when a button is inside a form - not initialized on a FormGroup - and does nothing to do with the form, like back or cancel, it reloads the whole page.
For the example it's gonna be a send button and a back button.
What I want to do is having two buttons at the same margin-top and with a margin between them. So if both buttons are inside the form everything goes awesome, leaving out the problem I just mentioned. If I let out the form the cancel button my style goes to hell but the flow works like Angular2 does: awesome.
Well, I think that leaving the button inside the form is kind of bad practice, but I really don't know how to handle it. So, is there any way of adding a button inside the form without being part of it? (I would really expect for this Angular2 answer) Or, is it possible to do some magic inside the .css file in order to fake the being of the button inside the form? (I think this would be the hard way, but maybe the correct one).
Thanks a lot.
Just in case anyone asks for the code:
html (the button is gonna be inside the form):
<form [formGroup]="f" (ngSubmit) = "onSubmit()">
<div class = "form-group">
<input placeholder = "e-mail" formControlName = "email" type = "text">
</div>
<div class = "form-group">
<input placeholder = "Password" formControlName = "password" type = "password">
</div>
<div class = "form-group">
<input placeholder = "Pass-conf" formControlName = "pass-conf" type = "password">
</div>
<div class="buttons">
<button class = "ok" type = "submit"><img src="./assets/img1.png" alt="Ok"></button>
<button class = "back" (click) = "back ()"><img src="./assets/img2.png" alt="Back"></button>
</div>
</form>

