Questions tagged [angular-hybrid]

For questions about running AngularJS and Angular 2+ frameworks side-by-side

For questions about running AngularJS and Angular 2+ frameworks side-by-side

One of the keys to a successful upgrade is to do it incrementally, by running the two frameworks side by side in the same application, and porting AngularJS components to Angular one by one. This makes it possible to upgrade even large and complex applications without disrupting other business, because the work can be done collaboratively and spread over a period of time. The upgrade module in Angular has been designed to make incremental upgrading seamless.

For more information, see Angular Developer Guide - Upgrading from AngularJS

The DEMO on PLNKR

104 questions
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
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 {…
10
votes
0 answers

Importing AngularJS 1.6 into Angular-Universal Project

We have a hybrid Angular6 and AngularJS 1.6 project which we are currently migrating. In this process, we also want to introduce Server Side Rendering (SSR). The problem is, that the SSR is running in a node environment, so running the…
helgetan
  • 1,367
  • 11
  • 16
9
votes
1 answer

Not recognized camelcase parameters in downgraded component in an Angular hybrid application

I have a angularjs 1.6 that has just been configured to have hybrid bootstrap with angular 8. I created 2 new components DriverDetail and DriverDetailLine both in angular 8: @Component({ selector: 'driver-detail', template:…
7
votes
2 answers

How to use a glob pattern in the scripts section of angular.json?

I have a hybrid AngularJS/Angular application that will take some time to complete migration to fully be an Angular app. While this process occurs, I'd like to move away from the previous build system to using the CLI and webpack to manage all of…
atconway
  • 20,624
  • 30
  • 159
  • 229
7
votes
2 answers

Angular 1 and Angular 2 Hybrid Application Routing Issue (angular component not displaying)

I have an Angular 1 and Angular 2 hybrid application that was set-up using the following guides, Upgrading from AngularJS and Migrating Angular 1 Application to Angular 2. My root component looks like this: import { NgModule, Component } from…
lukegf
  • 2,147
  • 3
  • 26
  • 39
6
votes
1 answer

Downgrade Angular component to AngularJS

I'm trying to downgrade my Angular component to make it use in AngularJS app. For test I created quite trivial Angular component: // my-test.component.ts @Component({ selector: 'my-test', template: '

Hello World

' }) export class…
Andurit
  • 5,612
  • 14
  • 69
  • 121
6
votes
1 answer

No provider for $injector in Angular Testing

I've been trying to setup testing in our Hybrid AngularJS/NG6 App but wow is this difficult to do. I keep getting constant errors. The latest is the following: Error: StaticInjectorError(DynamicTestModule)[$injector]: …
Edgar Quintero
  • 4,223
  • 2
  • 34
  • 37
6
votes
0 answers

How to turn on AOT in an angular hybrid application using downgradeModule and angular-cli?

I am migrating an AngularJS application to Angular 7 using the downgradeModule (described here: upgrade for performance). In the last part of that documentation it is stated that I need to import the NgModuleFactory of my AppModule when I want to…
6
votes
1 answer

Hybrid Angular 1.x + Angular 6 App with both vanilla JS and TS files in Angular 1.x

I'm trying to build a hybrid app when the AngularJS files are both JS and TS. I can't seem to add a route to a JS controller. I'm relying on the following example and doing the following: const statesConfigBlock = ['$stateProvider', $stateProvider…
6
votes
1 answer

Angular Hybrid Error: Trying to get the AngularJS injector before it being set

How to use AngularJS service in Angular 5 component? I have AngularJS application and i am trying to make hybrid app but not able to use AngularJS service insight Angular component : getting error ERROR Error: Trying to get the AngularJS injector…
Andrei
  • 341
  • 7
  • 23
5
votes
3 answers

Angular 9 hybrid with ui router causes Trying to get the AngularJS injector before it being set. How to debug/fix?

[EDIT] I've created a demo repository with this error: https://github.com/SamanthaAdrichem/hybrid-lazy-load-angularjs-injector-error We've followed the instructions, and all runs fine on normal hybrid, but adding lazy loading fails with the strange…
5
votes
1 answer

UI-router hybrid: NG2 states not working before an NG1 state with an NG2 component is triggered

I have a large angularjs 1.7.4 app with UI-router in HTML5 mode with multiple entrypoints. (The project uses babel 7.6 to compile typescript and corejs3 polyfills, so I am not using angular-cli). I am trying to migrate one of the entry points to a…
Stefan Norberg
  • 1,137
  • 13
  • 28
4
votes
1 answer

Load Angularjs bundle in a hybrid application with Angular 7

I have a big application and I applied some changes to make it Hybrid. It will work fine if the old bundle of Angularjs app loads first on time. (it is a 4-5MB bundle) I was checking the samples on the net and most of them just say the same. for…
arya
  • 53
  • 7
1
2 3 4 5 6 7