Using the `upgrade` module in Angular to incrementally upgrade an AngularJS application to Angular.
Questions tagged [ng-upgrade]
157 questions
21
votes
6 answers
Using downgradeModule in conjunction with downgradeInjectable in an angular / angularjs hybrid application results in error
With angular 5.0 the upgrade module now has the option of using downgradeModule which runs angularjs outside of the angular zone. While experimenting with this I have run into a problem with using downgradeInjectable.
I am receiving the…

theOwl
- 431
- 1
- 3
- 9
21
votes
1 answer
Running Angular and AngularJS frameworks side by side
I have found resources that describe how to integrate Angular (2) components into AngularJS, but all of these have involved setting up the AngularJS project like an Angular project, requiring a transpiler from TypeScript, requiring ES6, requiring…

dz210
- 748
- 1
- 8
- 20
17
votes
1 answer
Migrating AngularJS to Angular 4,5 (with DEMO)
I am looking into ways of migration a current Angular 1 project to Angular 4.
Options are ng-forward, ngUpgrade or rewrite.
I am thinking on rewriting it but with a twist.
I keep the current application
Start writing the new one parallel to it
All…
user7776690
17
votes
2 answers
Inject angularjs service into Angular
I'm trying to use $log service into an angular 2, According to what I read you need the following steps:
Create a module that contains the service you want to inject.
Call UpgradeAdapter's upgradeNg1Provider method.
So, I did the following
var…

hex
- 515
- 2
- 4
- 13
14
votes
1 answer
Angular 1.x/2 Hybrid, karma tests not bootstrapping ng1 app
I currently have a Hybrid Angular app (2.4.9 and 1.5.0) using angular-cli. Currently, when running our application, we are able to bootstrap the 1.5 app correctly:
// main.ts
import…

jt-platterz
- 141
- 5
13
votes
1 answer
Change-detection not working properly in ng2 component after navigation via angular1 ui-router
In an application that uses ng-upgrade to use some new ng2 (V2.2.4) components inside a big ng1 (V1.5.9) app (using ui-router) I am currently seeing a very strange change-detection issue. As far as I can tell, this has been introduced in some…

NoUsername
- 693
- 6
- 20
12
votes
2 answers
@angular/router not working inside an angular.js application
I'm working on migrating little by little a big angular.js application (that uses ui-router) to angular and I opted by using the angular.js application as a base and migrate the different routes one at a time so that once I'm finished I switch…

curial
- 514
- 4
- 17
11
votes
9 answers
NgUpgrade: Unable to use templateUrl when upgrading Angular1 components
I want to upgrade a ng1 component to be used inside an ng2 component.
If I use just a template string the ng1 component, to be upgraded, it works. However, if I switch to using a templateUrl instead, the app crashes and give me this error:…

Houa
- 113
- 1
- 5
10
votes
1 answer
$Injector Error on Angular Upgrade from 1.6.6 to 6
I did Angular upgrade from Angular.Js 1.6.6 to Angular 6 using Webpack 4:
import 'core-js/es7/reflect';
import 'zone.js';
import 'reflect-metadata';
import 'rxjs';
import { NgModule } from '@angular/core';
import {…

Droid Kree
- 161
- 1
- 10
10
votes
1 answer
No provider for $scope! error when using a angular 1 directive in an angular 2 app
I have an angular 2 App built with angular-cli and I need to use an angular 1 directive in one of my components (to re-use it from a different application). I followed the steps…

raluca
- 136
- 1
- 5
9
votes
1 answer
How to use angular 1.3.4 and angular 2 together
I have already an application which is build on angular 1.3.4 and I want to change it to angular 2 but module wise.
lets say I've 5 modules on my page I want to migrate one module to angular 2 and other should work as it is like before with 1.3 so…

Mohit Bumb
- 2,466
- 5
- 33
- 52
8
votes
2 answers
Can't resolve parameters for app module
I'm trying to run a hybrid app with angular 1.6 and 5. The manual bootstraping worked. As soon as I tried to bootstrap a hybrid application, I get the following error:
compiler.js?7e34:466 Uncaught Error: Can't resolve all parameters for
…

Daniel
- 834
- 1
- 9
- 25
8
votes
3 answers
ngUpgrade performance considerations
I am trying to figure out if we can move our Angular 1 application to Angular 2. We have a sufficient amount of code to warrant using ng-upgrade as opposed to starting from scratch.
Our current application is pushing the performance limits of what…

Chris
- 26,744
- 48
- 193
- 345
7
votes
0 answers
Angular cli: include angularjs component styles in ngUpgrade hybrid project
Now I'm moving to a hybrid angular/angularjs project. But I stuck with import styles problem.
For example, my simple angularJs component:
import template from './simple.html';
import controller from './simple.controller.js';
import './simple.less';…

ValentinK
- 83
- 1
- 6
7
votes
3 answers
Angular NgUpgrade inject AngularJS service into Angular service; getting: Unhandled Promise rejection: Cannot read property 'get' of undefined ; Zone:
I'm seeing a lot of similar problems on here, but have yet to find a solution that works. What I THINK is happening is that, because our Ng2App is bootstrapped first, it doesnt have a reference to $injector yet, so when I try to use it in my…

Andrew Luhring
- 1,762
- 1
- 16
- 37