0

There were some enhancements needed to be done from an old project but my Angular is angular 14 and the project is in Angular 5. I cannot load the project because of the version compatibility issues. I have tried simply everything including deleting the node modules and installing it one by one, npm update, ng serve.

The main errors are <button class="reset float-left" [routerLink]="['/patient']">BackCan't bind to 'routerLink' since it isn't a known property of 'button'.ngtsc(-998002) blood-sugar-monitoring.component.ts(27, 1): Error occurs in the template of component BloodSugarMonitoringComponent. and

(property) BloodSugarMonitoringComponent.bloodsugarGroup: FormGroup Can't bind to 'formGroup' since it isn't a known property of 'form'.ngtsc(-998002) blood-sugar-monitoring.component.ts(27, 1): Error occurs in the template of component BloodSugarMonitoringComponent. I have done everything including importing the Form and ReactiveFormModule
loki_cap
  • 99
  • 1
  • 4
  • RouterModule and FormsModule needs to be imported in the right modules – radio_head Sep 19 '22 at 06:11
  • If the project is not huge, I would try building a new Angular 14 project and then copying the v5 components and services manually. All at once or one by one, as it makes sense. You're bound to have some incompatibilities: Angular 5 is "ancient", in relative terms. And learn to look at the documentation: https://angular.io/api/router/RouterLink for RouterLink it says that you will need to import the RouterModule. Do you have it? – Alberto Chiesa Sep 19 '22 at 06:35
  • Yeah that's what I did do in the end. Manually created from scratch. And I do have the RouterModule but even then the error won't go – loki_cap Sep 19 '22 at 06:53

0 Answers0