| 106 | |
| 107 | // This Angular directive will act as an interface to the "upgraded" AngularJS component. |
| 108 | @Directive({ |
| 109 | selector: 'ng1-hero', |
| 110 | standalone: false, |
| 111 | }) |
| 112 | class Ng1HeroComponentWrapper extends UpgradeComponent { |
| 113 | // The names of the input and output properties here must match the names of the |
| 114 | // `<` and `&` bindings in the AngularJS component that is being wrapped. |
| 115 | hero = input.required<Hero>(); |
| 116 | onRemove = output<void>(); |
| 117 | |
| 118 | constructor(elementRef: ElementRef, injector: Injector) { |
| 119 | // We must pass the name of the directive as used by AngularJS to the super. |
| 120 | super('ng1Hero', elementRef, injector); |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | // This Angular module represents the Angular pieces of the application. |
| 125 | @NgModule({ |