import { environment } from 'environment';
import * as jsyaml from 'js-yaml';
import { RestService } from 'RestService';
import { environment } from 'environment';
import * as jsyaml from 'js-yaml';
import { RestService } from 'RestService';
/** Element ref for fileInputConfig @public */
@ViewChild('fileInputConfigLabel', { static: true }) public fileInputConfigLabel: ElementRef;
/** Element ref for fileInputConfig @public */
@ViewChild('fileInputConfigLabel', { static: true }) public fileInputConfigLabel: ElementRef;
- /** Contains all methods related to shared @private */
- private sharedService: SharedService;
+ /** convenience getter for easy access to form fields */
+ get f(): FormGroup['controls'] { return this.wimNewAccountForm.controls; }
if (files && files.length === 1) {
this.sharedService.getFileString(files, 'yaml').then((fileContent: string): void => {
const getConfigJson: string = jsyaml.load(fileContent, { json: true });
if (files && files.length === 1) {
this.sharedService.getFileString(files, 'yaml').then((fileContent: string): void => {
const getConfigJson: string = jsyaml.load(fileContent, { json: true });
this.wimNewAccountForm.get('config').setValue(JSON.stringify(getConfigJson));
}).catch((err: string): void => {
if (err === 'typeError') {
this.wimNewAccountForm.get('config').setValue(JSON.stringify(getConfigJson));
}).catch((err: string): void => {
if (err === 'typeError') {