This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="home customer-login container-fluid login-merchant toll-register toll-register-company toll-register-branch toll"> | |
<nav class="navbar navbar-fixed-top"> | |
<div class="container-fluid row"> | |
<div class="col-xs-6 col-sm-4"> | |
<h2 class="cursor doe-tag" [routerLink]="['/home']"> | |
<img src="assets/images/toll/arrow.png">DOE</h2> | |
</div> | |
<div class="col-xs-6 col-sm-4"> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Component,ViewChild,OnInit} from '@angular/core'; | |
import {Observable} from 'rxjs/Observable'; | |
import {ActivatedRoute} from '@angular/router'; | |
import {RouterModule,Routes,Router} from '@angular/router'; | |
import { TollService } from "../../../services/toll.service" | |
import { FormBuilder, FormArray, FormGroup, Validators, FormControl } from "@angular/forms"; | |
import { CommonModal } from "../../../common/modal/modal.component"; | |
@Component({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Component,ViewChild,OnInit} from '@angular/core'; | |
import {Observable} from 'rxjs/Observable'; | |
import {ActivatedRoute} from '@angular/router'; | |
import {RouterModule,Routes,Router} from '@angular/router'; | |
import { TollService } from "../../../services/toll.service" | |
import { FormBuilder, FormArray, FormGroup, Validators, FormControl } from "@angular/forms"; | |
import { CommonModal } from "../../../common/modal/modal.component"; | |
@Component({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ngOnInit() { | |
this.form = this.fb.group({ | |
'Xs': this.fb.array([ | |
this.initX() | |
]) | |
}); | |
this.form.valueChanges.subscribe(data => this.validateForm()); | |
this.validateForm(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form [formGroup]="form"> | |
<!-- X --> | |
<div formArrayName="Xs"> | |
<div *ngFor="let X of form['controls'].Xs['controls']; let ix=index"> | |
<div formGroupName="{{ix}}" class="Xs"> | |
<input type="text" formControlName="X"> | |
<p>{{ formErrors.Xs[ix].X }}</p> | |
<!-- Y --> | |
<div formArrayName="Ys"> | |
<div *ngFor="let Y of X['controls'].Ys['controls']; let iy=index"> |