We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The inject migration only updates the first usage when a property get's assigned in the ctor. See the below snippets for an example.
Input:
import { Component } from '@angular/core'; @Component({ template: '' }) export class MyComponent { depOne$: Observable<string>; depTwo$: Observable<string>; depThree$: Observable<string>; depFour$: Observable<string>; constructor(private service: Service) { this.depOne$ = service.depOne$; this.depTwo$ = service.depTwo$; this.depThree$ = this.service.depThree$; this.depFour$ = service.depFour$; } }
Expected output:
import { Component, inject } from '@angular/core'; @Component({ template: '' }) export class MyComponent { private service = inject(Service); depOne$: Observable<string>; depTwo$: Observable<string>; depThree$: Observable<string>; depFour$: Observable<string>; constructor() { this.depOne$ = this.service.depOne$; this.depTwo$ = this.service.depTwo$; this.depThree$ = this.service.depThree$; this.depFour$ = this.service.depFour$; } }
Received output:
import { Component, inject } from '@angular/core'; @Component({ template: '' }) export class MyComponent { private service = inject(Service); depOne$: Observable<string>; depTwo$: Observable<string>; depThree$: Observable<string>; depFour$: Observable<string>; constructor() { this.depOne$ = this.service.depOne$; this.depTwo$ = service.depTwo$; ~~~~~~~ throws error, migration doesn't add this keyword this.depThree$ = this.service.depThree$; this.depFour$ = service.depFour$; ~~~~~~~ throws error, migration doesn't add this keyword } }
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
The inject migration only updates the first usage when a property get's assigned in the ctor.
See the below snippets for an example.
Input:
Expected output:
Received output:
The text was updated successfully, but these errors were encountered: