Questions tagged [ng-upgrade]

Using the `upgrade` module in Angular to incrementally upgrade an AngularJS application to Angular.

157 questions
0
votes
0 answers

Problem building Hybrid Angular App to production. AOT compiler break downgraded components

I will try to explain my problem in the best way. I am migrating an AngularJS application to Angular 12. I need the two applications to run in parallel for the migration to be gradual. I used the NgUpgrade library and I'm running the two…
0
votes
1 answer

Avoid client side code caching in angular

How to avoid caching of JavaScript, CSS, image files which are mentioned in Angular.JSON & in components. Basically we want to know how to handle caching or is there any way by which Angular handles it on its own.
0
votes
0 answers

Error: HighlightDirective cannot be used as an entry component. NgUpgrade

I am upgrading my old AngularJS application to Angular using the NgUpgrade module. Upgrading components seems to work ok but I have struggled with getting a directive to work. After I couldnt upgrade my own component I copied the Highlight…
Chris
  • 26,744
  • 48
  • 193
  • 345
0
votes
2 answers

Imports of Shared Module not working in Shared components after upgrading Angular 9

I have upgraded my project to below versions Node from 11 -> 12 Angular from 8 -> 9 App started throwing compile time errors. Application has lot of shared components which are declared under declarations array and export array of SharedModule We…
Syed Abbas
  • 49
  • 1
  • 8
0
votes
1 answer

Angular Hybrid: TypeError: Cannot read property 'get' of undefined

I have an NgUpgrade app where I'm migrating from Angular.js's UI-Router to Angular's Router and everything was going well until I introduced a lazy-loaded module. Then, in one of the components from the lazy-loaded module I got this: Found an error…
Daniel
  • 21,933
  • 14
  • 72
  • 101
0
votes
0 answers

Angular - Cannot read property 'Identifiers' of undefined

I'm following along with the ngUpgrade documentation (https://angular.io/guide/upgrade) As things usually are the angular documentation appears to be outdated and/or just not that great. I've followed along to the point of bootstrapping the…
0
votes
2 answers

AngularJS 1.4 --> Angular 9 migration vs bigbang rewrite

I have decided to do a complete rewrite of the large scale application that I am working on since it is in AngularJS 1.4. I transferred over most of my HTML and CSS files and am now ready to create the TypeScript files. Do I need to create a…
0
votes
0 answers

integrating angular 6 component into angularjs template

I am trying to integrate Angular 6 component into AngularJs template. What I am working on is not root application. It is used as library for the root application. I have created the app.ts like below. import * as angular from 'angular'; import {…
Anna Lee
  • 909
  • 1
  • 17
  • 37
0
votes
1 answer

Why does Angular recommend to use a FactoryProvider for upgraded ajs services, instead of an InjectionToken?

In their documentation, they use this FactoryProvider example for upgrading ajs services: import { HeroesService } from './heroes.service'; export function heroesServiceFactory(i: any) { return i.get('heroes'); } export const…
CShark
  • 1,562
  • 1
  • 16
  • 27
0
votes
1 answer

Can't run AngularJS inside Angular 8 using ngUpgrade

I'm trying to run Hybrid Angular application using ngUpgrade from documentation. The problem is that no matter what I'll do AngularJS is just not raising. When I put Angular and AngularJS together then both application runs. …
DiPix
  • 5,755
  • 15
  • 61
  • 108
0
votes
1 answer

Error while loading controllers - migrating AngularJS1 to Angular6

I'm trying to do upgrade components written in AngularJS1 to Angular6. I'm taking the approach of having the wrappers for all the existing AngularJS1 component by extending "UpgradeComponent" placed under the folder "directive-wrappers" in my…
Krishnan
  • 958
  • 5
  • 21
  • 44
0
votes
1 answer

Unexpected Rejections upon Karma Start up with NgUpgrade

I'm in the process of integrating ngupgrade into our AngularJS app and I keep getting these unexpected rejection errors when Karma is loading up. My app is working fine with ngupgrade it's just the unit tests that are having this problem. Luckily…
0
votes
2 answers

Switch between 2 global SCSS using selector

I'm upgrading my company AngularJS project to Angular 8 thanks to ngUpgrade. So I have a hybrid application with both angularjs and angular components. I am also using an angular material template that provides SCSS files for both angular and…
0
votes
0 answers

Any similar usage for "require" (Angular js) in Angular 5

We are facing an issue while doing the migration from AngularJS to Angular 5 by using ngUpgrade module Below is the code snippet: class abcController{ //some instructions } const abcDefination = { restrict: 'E', require: { …
Pooja
  • 11
  • 6
0
votes
0 answers

After upgrading angular from 5.1 to 8, flex-layout have few errors

Flex-layout-error-log below is my package.json with all the dependencies, i have a flex-layout version 8.0.0-beta.26, please suggest a way or work around for this "dependencies": { "@angular/animations": "8.1.0", "@angular/cdk": "^8.0.2", …
Harshavardhan N
  • 143
  • 1
  • 1
  • 9