InterviewHubPRO
Section Overview
Q148

Question 148 of 283

Part 6: Decorators, Dependency Injection & Tooling (124 - 150)

52%
Angular & Signals (283 Qs)•Part 6: Decorators, Dependency Injection & Tooling (124 - 150)

What is NgUpgrade?

NgUpgrade is a library put together by the Angular team, which you can use in your applications to mix and match AngularJS and Angular components and bridge the AngularJS and Angular dependency injection systems.

Practical Code Example

typescript
// NgUpgrade: Hybrid adapter library allowing AngularJS and Angular components to coexist:
import { UpgradeModule } from '@angular/upgrade/static';

export class AppModule {
  constructor(private upgrade: UpgradeModule) {}
  ngDoBootstrap() {
    this.upgrade.bootstrap(document.body, ['legacyAngularJsApp']);
  }
}