export class ExampleComponent implements OnInit, OnDestroy {
exampleSubOne: Subscription;
exampleSubTwo: Subscription;
constructor(private exampleService: ExampleService) {}
ngOnInit() {
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
//========================================= dynamic-fields.service.ts | |
import { Injectable } from '@angular/core'; | |
import { FormControl, Validators } from '@angular/forms'; | |
/** | |
* @description Dynamic fields service is used to generate reactive form group fields with Validators | |
*/ | |
@Injectable({ | |
providedIn: 'root' |
NewerOlder