feat: add a bunch of new Nebular demos (#1911)

This commit is contained in:
Denis Strigo 2018-11-19 16:57:35 +02:00 committed by GitHub
parent c594a5a4c5
commit 3f1f4c558b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
185 changed files with 5176 additions and 422 deletions

View file

@ -0,0 +1,43 @@
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
@Component({
selector: 'ngx-stepper',
templateUrl: 'stepper.component.html',
styleUrls: ['stepper.component.scss'],
})
export class StepperComponent implements OnInit {
firstForm: FormGroup;
secondForm: FormGroup;
thirdForm: FormGroup;
constructor(private fb: FormBuilder) {
}
ngOnInit() {
this.firstForm = this.fb.group({
firstCtrl: ['', Validators.required],
});
this.secondForm = this.fb.group({
secondCtrl: ['', Validators.required],
});
this.thirdForm = this.fb.group({
thirdCtrl: ['', Validators.required],
});
}
onFirstSubmit() {
this.firstForm.markAsDirty();
}
onSecondSubmit() {
this.secondForm.markAsDirty();
}
onThirdSubmit() {
this.thirdForm.markAsDirty();
}
}