Reference 1: https://gist.github.com/JohannesHoppe/e8d07d63fc345a5fdfdf4fc4989ef2e4 import { FormGroup, ValidationErrors } from ‘@angular/forms’; export function getFormValidationErrors(form: FormGroup) { const result = []; Object.keys(form.controls).forEach(key => { const controlErrors: ValidationErrors = form.get(key).errors; if (controlErrors) { Object.keys(controlErrors).forEach(keyError => { result.push({ ‘control ‘: key, ‘error’: keyError, ‘value’: controlErrors[keyError] }); }); } }); return result; } Reference 2: public ngOnInit() { this.form.valueChanges.subscribe(data => this.onValueChanged(data));…
Category: Angular (ngx)
Local workspace file (‘angular.json’) could not be found.
After upgrading Angular application using ncu -a, got an error message Local workspace file (‘angular.json’) could not be found.</code. $ ncu -a $ npm run build Local workspace file (‘angular.json’) could not be found. Error: Local workspace file (‘angular.json’) could not be found. at WorkspaceLoader._getProjectWorkspaceFilePath (/srv/project/node_modules/@angular/cli/models/workspace-loader.js:44:19) at WorkspaceLoader.loadWorkspace (/srv/project/node_modules/@angular/cli/models/workspace-loader.js:31:21) at BuildCommand._loadWorkspaceAndArchitect (/srv/project/node_modules/@angular/cli/models/architect-command.js:189:32) at BuildCommand.<anonymous> (/srv/project/node_modules/@angular/cli/models/architect-command.js:55:25)…
Time Clock Management System developed with Yii2 REST API + Angular 2 + Docker
Time Clock Management System (Yii2 REST API + Angular 2 + Docker) Source Repo: https://github.com/chrisleekr/time-clock-management-system-yii2-rest-api-angular2-docker This is a personal project for learning Angular 2. The project contains two applications, one for REST API backend, and the another for Angular 2 frontend. The project involves: Yii2 for providing RESTful API including user login/logout, managing global…