Questions tagged [ng-upgrade]

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

157 questions
1
vote
0 answers

Template attributes not resolved for upgraded Angular 1 component directive

I have the following Angular 1 directive: return function(module) { module.directive('myButtonUpgrade', myButtonUpgrade); function myButtonUpgrade() { return { restrict: 'E', template:…
1
vote
0 answers

Angular 2: subscribe to AngularJS $scope.$broadcast / $scope.$emit messages?

I'm in the process of incrementally upgrading an existing Angular 1 codebase to Angular 2 using ngUpgrade. I'm converting an existing ng1 directive into an ng2 component. The old version has several $scope.$on handlers, listening for…
Stuart Updegrave
  • 687
  • 5
  • 25
1
vote
1 answer

Unknown provider error in ngUpgrade (Angular 1/2 hybrid application)

I'm starting on a new project forked from an existing Angular 1 codebase, with the intention of using ngUpgrade to do new development using Angular 2. I've successfully added Angular 2 to the project, but when I try to instantiate ngUpgrade in order…
Stuart Updegrave
  • 687
  • 5
  • 25
1
vote
1 answer

NgUpgrade: Can I use Angular2 Component in app bootstrapped with `ng-app`?

If I want to use the Angular-upgrade module in my Angular1 application it seems like I have to bootstrap the whole app using Angular2's bootstrapping, including ditching the ng-app declaration. My team is very interested in graduating our apps'…
Charles Harris
  • 304
  • 1
  • 2
  • 18
1
vote
1 answer

how I get component element like link function elem variable in angular 1.5

I am new in angular 1.5 now I have a problem. How I get current component element reference in controller function like angular 1.3 link : function(scope, elem, attr) function. elem denote to directive element. Angular 1.3 templateUrl :…
Sandeep
  • 1,461
  • 13
  • 26
1
vote
1 answer

How to import the angular upgrade adapter to get a hybrid application?

I looked at at the official upgrade guide, some blogs like this but I don't get it. I wanted to take a look at the upgrade module of angular2, but failed right at the beginning when I tried to bootstrap my ng1 application with the angular upgrade…
jowey
  • 7,581
  • 6
  • 27
  • 46
1
vote
1 answer

Angular2 with ngUpgrade: Angular does not recognize component in view

After few days of playing with Angular 2 Hero tutorial, I decided to play with ngUpgrade. So I bootstrap Angular with upgradeAdapter and downgrade Angular 2 component to match Angular 1 version: ///
0
votes
0 answers

is it possible to use a component/module from angular 15 in angular js currently?

I have an angularjs application in the most current version, 1.8. and I want to be able to use angular 15 components in my app using ngupgrade downgradeComponent/downgradeModule function, however all the information I've found is a bit old and it's…
Josu16
  • 43
  • 4
0
votes
0 answers

ngx-toastr gives injection context error in hybrid Angular app using ngUpgrade

I am getting an error as soon as I declare ngx-toastr in my Hybrid AngularJS-Angular12 app: angular.js:15697 Error: inject() must be called from an injection context at injectInjectorOnly (core.umd.js:5072:1) at ɵɵinject (core.umd.js:5083:1) at…
rikuwolf
  • 103
  • 2
  • 10
0
votes
1 answer

Is AngularJS Conversion to .ts required for Angular/AngularJS Hybrid Application?

Undertaking upgrade of an AngularJS v1.25 to Angular 14, using the ng-Upgrade approach as described on angular.io/guide/upgrade. To make things even steeper, our app's main page is ASP.NET MVC 5. I would like to use the Angular CLI for the new…
jessewolfe
  • 372
  • 3
  • 10
0
votes
2 answers

Angular ng-upgrade stuck in infinite loop with singleton provider

We're performing a AngularJS-Angular migration for a big client with a huge, messy codebase (794k+ JS LoC, 396k+ JSP LoC) and have hit an issue we're struggling to solve. It's a bit of a contrived issue so I'll try to explain the context a…
Jansky
  • 1,455
  • 1
  • 17
  • 33
0
votes
1 answer

Incompatible peer dependency to @angular/core: Angular update

I am trying to upgrade my angular application from version 6 to version 7. I am using below command to do so, but its throwing a warning. I don't want to use "force" commands as it may cause further consequences. Please find the details…
Bhushan Khaladkar
  • 420
  • 1
  • 7
  • 20
0
votes
0 answers

Property 'subscribe' does not exist on type 'BehaviorSubject'

I am using BehaviorSubject for the communication between components. But when I try to subscribe, it is throwing an error as "Property 'subscribe' does not exist on type 'BehaviorSubject'." private dictionarySubject: BehaviorSubject =…
Bhushan Khaladkar
  • 420
  • 1
  • 7
  • 20
0
votes
1 answer

Webpack.optimize.UglifyJsPlugin lowercasing my Angular html template attribute names

Edit 11/10/21 Below is the original question for this post. Since posting, I figured out that the issue is not in the application code itself, but how webpack compiles/packages the final deployment files. As part of the build process, I am uglifying…
GPicazo
  • 6,516
  • 3
  • 21
  • 24