Skip to content
New issue

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

Rename selector #816

Open
dgp1130 opened this issue Jun 11, 2020 · 1 comment
Open

Rename selector #816

dgp1130 opened this issue Jun 11, 2020 · 1 comment
Assignees
Labels
feature ivy Feature / enhancement / bug fix in Ivy lib Relates to an issue in the @angular/language-service library

Comments

@dgp1130
Copy link
Collaborator

dgp1130 commented Jun 11, 2020

Is your feature request related to a problem? Please describe.

Renaming the selector of a component is a pain. You have to manually search for all its usages in an application and change them yourself.

Describe the solution you'd like

Right clicking on a selector property in VSCode should have a "rename" option. This should trigger the normal rename flow and update all references is Angular templates to match. For example:

// foo.component.ts

@Component({
  selector: 'app-foo', // <-- Rename of this value...
})
export class FooComponent {
  // ...
}
<!-- bar.component.html -->

<!-- vvv Should rename this usage vvv -->
<foo-component></foo-component>

Describe alternatives you've considered

Find-replace is about the best I can think of. Not a terrible alternative, but may get some cases wrong and requires more mental effort to actually apply.

Additional context

N/A

@ayazhafiz
Copy link
Member

Related to #29

@ayazhafiz ayazhafiz added the lib Relates to an issue in the @angular/language-service library label Jun 13, 2020
@kyliau kyliau added the ivy Feature / enhancement / bug fix in Ivy label Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature ivy Feature / enhancement / bug fix in Ivy lib Relates to an issue in the @angular/language-service library
Projects
None yet
Development

No branches or pull requests

4 participants