Questions related to upgrading AngularJS (v1.x) application to Angular (v2+). This tag should be used for questions related to preparing AngularJS application for upgrade, running a hybrid AngularJS/Angular application, and transitioning out of hybrid mode.
Questions tagged [angular-upgrade]
213 questions
3
votes
6 answers
How to update Angular 7 to Angular 8 by ng update
I try update Angular project from version 7.2.5 to 8 of the core framework and CLI by running ng update @angular/cli @angular/core in terminal.
Response from terminal was 'We analyzed your package.json and everything seems to be in order. Good…

ErikHer
- 227
- 2
- 5
- 12
3
votes
0 answers
Is there any alternative to UpgradeAdapter.registerForNg1Tests?
I have an Angular hybrid app which use UpgradeModule. The AngularJS components depend on Angular services downgraded by downgradeInjectable. When I unit test the components, I saw this error.
Error: Error while instantiating injectable 'MyService':…

rch850
- 710
- 1
- 5
- 14
3
votes
1 answer
Upgrade angular 4 to 7 http to httpclient
Currently, I am upgrading my Angular project4 using webpack to Angular7.
I stuck in one step
Switch from HttpModule and the Http service to HttpClientModule and
the HttpClient service. HttpClient simplifies the default ergonomics
(You don't need…

Spring
- 831
- 1
- 12
- 42
3
votes
2 answers
Update Angular 6 to 7 - dependency warning and typescript error
I used this link to upgrade my simple angular frontend to Angular 7:
Update to Angular 7
While updating i got several warnings for package.json and polyfills.ts files:
UPDATE package.json (1313 bytes)
npm WARN @ngtools/webpack@6.1.5 requires a peer…

student18
- 538
- 8
- 26
3
votes
0 answers
Angular UpgradeModule: can't get element to bind during app bootstrap
I have an old AngularJS app I'm trying to implement an upgrade-in-place using the Angular 6 UpgradeModule. I can get all the code to execute -- I'm logging out states as expected through both the Angular 6 and AngularJS apps.
The problem is that I'm…

hastypudding
- 66
- 1
- 3
3
votes
1 answer
npm test fails after upgrade from angular4 to angular 5 "test.ts is missing from the TypeScript compilation"
I upgraded my app from angular4 to angular 5 following the steps mentioned here: https://update.angular.io/
I am able to run ng-serve , ng build etc without any issue.
But ng test (npm test) is failing with error:
\src\test.ts is missing from the…

undefined
- 3,464
- 11
- 48
- 90
3
votes
1 answer
Angular UpgradeComponent with name binding
I'm using the UpgradeComponent to use an AngularJS component in Angular 5. The AngularJS component has a binding called "name" which conflicts with a private variable on the UpgradeComponent.
Is there an easy way around this?

NDavis
- 1,127
- 2
- 14
- 23
3
votes
0 answers
How to get NgModelController (AngularJS) instance in Angular component (Angular upgrade, hybrid application)?
It was possible to require NgModelController in AngularJS Components. Something like require:
// AngularJS component's definition
{
// ...
ngModel: '^'
// ...
}
Is it possible to require NgModelController (from AngularJS) instance in Angular…

Sharikov Vladislav
- 7,049
- 9
- 50
- 87
3
votes
2 answers
Accomplish transclusion with ng-metadata
I am using AngularJs 1.6 with ng-metadata to progressively migrate the AngularJS components to Angular.
I need to build a component that is able to transclude a bit of HTML and I was hoping I can use something provided by ng-metadata since it will…

Radu Cojocari
- 1,759
- 1
- 22
- 25
3
votes
1 answer
Angular 2+ services to angularJs
I m trying to convert Angular 2+ service and use it in angularJs project.
app/users.service.ts
import { Injectable } from '@angular/core';
@Injectable()
export class UsersService {
private users: any = [
{ id: 1, name: 'john' },
…

Loic
- 101
- 1
- 3
3
votes
0 answers
Angular 2 Error "Uncaught ReferenceError: module is not defined" in systemjs-angular-loader.js
I am trying to use Angular 2 in the same app as Angular 1. To accomplish that I am using the Angular UpgradeModule. To install and set-up TypeScript and Angular 2, I've used the following guide: Upgrading from AngularJS.
My Angular 1 version is…

lukegf
- 2,147
- 3
- 26
- 39
2
votes
0 answers
why angular material components became unknown elements after upgrade to Angular 16
I encountered a problem with material components after I have upgraded Angular project from version 15 into version 16. Namely some of elements like mat-form-field, mat-label, mat-select caused errors: error NG8001: 'mat-label' is not a known…

Kianni
- 46
- 4
2
votes
1 answer
Angular Polyfill for Angular 14 app giving an error
I recently upgraded my angular app from v14 to v15. Due to a business need, we need to support Chrome 69 for the app. So, I added the following lines of code in my polyfills.ts file:
import '@angular/localize/init';
import 'core-js/stable';
import…

Nitin Avula
- 333
- 2
- 7
- 21
2
votes
0 answers
Angular Migration failed
I'm trying to update my project from ~10.1.6 to 11 with command:
ng update @angular/core@11 @angular/cli@11
error is
Package "@ng-select/ng-select" has an incompatible peer dependency to "@angular/common" (requires ">=9.0.0 <10.0.0" (extended),…

Mike
- 413
- 2
- 9
2
votes
2 answers
issue in Updating angular version 12 to 13
I have update angular from 12 to 13. After updating that I am getting error in browser console.
Below are steps:
npx @angular/cli@13 update @angular/core@13 @angular/cli@13(error: peer dependency)
npx @angular/cli@13 update @angular/core@13…

Swapnil Dargude
- 21
- 1
- 2