Forms angular 2 [closed]

0

I have a screen called login on the same screen I have two forms one with user and password and another only with email field. In the first form I have this snippet of code:

<a href="#" class=""> clique aqui

When I click: click here, I want to open second form on the same screen, ie, first form disappears and enters second form. How do I do ? already tried with jquery did not work. I'm using angular 2.

    
asked by anonymous 09.01.2017 / 19:59

1 answer

0

Through ngIf

 <button (click)="form2 = !form2">Mudar</button>
      <input type="text" placeholder="email" *ngIf="form2">
      <input type="text" placeholder="form2 Email" *ngIf="!form2">

Or through hidden

  <button (click)="form2 = !form2">Mudar</button>
  <input type="text" placeholder="email" [hidden]="form2">
  <input type="text" placeholder="form2 Email" [hidden]="!form2">
    
10.01.2017 / 12:01