import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';

@Component({
  selector: 'ngx-customers-add-edit-two',
  templateUrl: './customers-add-edit-two.component.html',
  styleUrls: ['./customers-add-edit-two.component.scss']
})
export class CustomersAddEditTwoComponent implements OnInit {

  constructor(
    private router: Router,
    private route: ActivatedRoute,
  ) { }

  admins =[{
    name:'',
    email:'',
    password:'',
    password_confirmation:''
  }];

  ngOnInit() {
  }

  previous(){
    this.router.navigate(['../register'], {relativeTo: this.route});
  }
  next(){
    this.router.navigate(['../registerThree'], {relativeTo: this.route});
  }
  plusAdmin(){
    this.admins.push({
      name:'',
      email:'',
      password:'',
      password_confirmation:''
    });
    console.log('forms after plus' , this.admins);
  
    
  }
  onDeleteRow(index:number) {
    this.admins.splice(index , 1);
    console.log('files after delete ',this.admins);
  }
}
