Go to file
Andrew Scott a86ca4fe04 feat(language-service): Enable renaming of pipes (#40523)
This commit updates the logic in the LS renaming to handle renaming of
pipes, both from the name expression in the pipe metadata as well as
from the template.

The approach here is to introduce a new concept for renaming: an
"indirect" rename. In this type of rename, we find rename locations
in with the native TS Language Service using a different node than the
one we are renaming. Using pipes as an example, if we want to rename the
pipe name from the string literal expression, we use the transform
method to find rename locations rather than the string literal itself
(which will not return any results because it's just a string).

So the general approach is:
* Determine the details about the requested rename location, i.e. the
  targeted template node and symbol for a template rename, or the TS
  node for a rename outside a template.
* Using the details of the location, determine if the node is attempting
  to rename something that is an indirect rename (pipes, selectors,
  bindings). Other renames are considered "direct" and we use whatever
  results the native TSLS returns for the rename locations.
* In the case of indirect renames, we throw out results that do not
  appear in the templates (in this case, the shim files). These results will be
  for the "indirect" rename that we don't want to touch, but are only
  using to find template results.
* Create an additional rename result for the string literal expression
  that is used for the input/output alias, the pipe name, or the
  selector.

 Note that renaming is moving towards being much more accurate in its
 results than "find references". When the approach for renaming
 stabilizes, we may want to then port the changes back to being shared
 with the approach for retrieving references.

PR Close #40523
2021-05-06 17:54:13 -04:00
.circleci ci: only run `publish_snapshot` when not PR (#41877) 2021-04-29 10:16:03 -07:00
.devcontainer build: upgrade to node 14 (#41544) 2021-04-14 09:40:17 -07:00
.github build: remove emojis from github issue templates (#41902) 2021-05-04 08:09:20 -07:00
.husky build: update to husky@5 (#39739) 2020-11-18 11:11:41 -08:00
.ng-dev build: update release configuration to use new release notes system (#41905) 2021-05-06 09:40:29 -04:00
.vscode build: use "outFiles" in .vscode/launch.json to speed up debugging sessions (#39848) 2020-12-17 11:23:13 -08:00
.yarn build: update to yarn v1.22.10 (#40562) 2021-01-26 10:52:27 -08:00
aio docs: update testing components doc with generated compileComponent (#41947) 2021-05-06 15:40:36 -04:00
dev-infra feat(dev-infra): include release notes in Github release entries when publishing (#41964) 2021-05-06 15:45:48 -04:00
docs docs: use relative path for the feature request process diagram (#41970) 2021-05-06 17:35:33 -04:00
goldens fix(common): add body as an optional property on the options of HttpClient.delete (#19438) (#41723) 2021-05-04 21:09:58 -07:00
integration build: update all non-major dependencies (#41884) 2021-04-30 14:25:09 -07:00
modules fix(dev-infra): update build tooling for latest changes in rules_nodejs (#40710) 2021-02-09 10:48:43 -08:00
packages feat(language-service): Enable renaming of pipes (#40523) 2021-05-06 17:54:13 -04:00
scripts build(docs-infra): update to latest puppeteer (#41764) 2021-04-28 12:33:20 -07:00
third_party test(core): fix `Function#name` shim used in IE11 (#41439) 2021-04-05 08:56:17 -07:00
tools build: update release configuration to use new release notes system (#41905) 2021-05-06 09:40:29 -04:00
.bazelignore test: delete integration test for language service plugin (#41740) 2021-04-23 11:00:40 -07:00
.bazelrc build: use platform from shared dev-infra package for remote execution (#41767) 2021-04-23 11:01:40 -07:00
.bazelversion build: update .bazelversion (#40579) 2021-01-26 11:35:54 -08:00
.clang-format feat(tooling): Add a .clang-format for automated JavaScript formatting. 2015-04-02 08:44:34 -07:00
.editorconfig build: use https link to editorconfig.org in .editorconfig (#27664) 2018-12-18 09:30:09 -08:00
.gitattributes test: fix ts api guardian and public guard tests on windows (#30105) 2019-04-26 16:32:22 -07:00
.gitignore fix(dev-infra): add vim .swp files to gitignore (#40094) 2020-12-14 11:39:41 -08:00
.gitmessage fix(platform-webworker): remove platform-webworker and platform-webworker-dynamic (#38846) 2020-09-30 09:13:59 -04:00
.mailmap build: add a Git .mailmap with my new name (#19550) 2017-10-09 14:35:30 -07:00
.npmrc build: rely on engines to prevent using npm for dependency install (#41477) 2021-04-07 12:05:01 -07:00
.nvmrc build: upgrade to node 14 (#41544) 2021-04-14 09:40:17 -07:00
.pullapprove.yml docs: add redirect and update updating-to-v11 to v12 (#41625) 2021-05-06 15:15:08 -04:00
.yarnrc build: update to yarn v1.22.10 (#40562) 2021-01-26 10:52:27 -08:00
BUILD.bazel build: remove `core-js` in favor of `core-js-bundle` (#41739) 2021-04-26 09:29:58 -07:00
CHANGELOG.md docs: release notes for the v12.0.0-rc.2 release 2021-05-05 16:00:36 -07:00
CODE_OF_CONDUCT.md docs: add Discord as an official communication channel (#39149) 2020-10-14 10:23:15 -07:00
CONTRIBUTING.md docs: add link to fork repo how-to (#41266) 2021-03-23 11:22:31 -07:00
LICENSE docs: update the copyright notice date (#40707) 2021-02-16 10:04:23 -08:00
README.md docs: update tagline (#41922) 2021-05-03 10:04:05 -07:00
WORKSPACE build: update all non-major dependencies (#41884) 2021-04-30 14:25:09 -07:00
browser-providers.conf.js ci: remove IE 9 and IE 10 from CI (#38931) 2020-09-25 14:31:10 -04:00
gulpfile.js build: update release configuration to use new release notes system (#41905) 2021-05-06 09:40:29 -04:00
karma-js.conf.js build: remove `core-js` in favor of `core-js-bundle` (#41739) 2021-04-26 09:29:58 -07:00
package.json release: cut the v12.1.0-next.1 release 2021-05-05 14:53:42 -07:00
renovate.json build(docs-infra): revert `watchr` to v3.0.1 to restore `docs-watch` performance (#41903) 2021-05-03 10:05:31 -07:00
test-events.js build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
test-main.js feat(platform-server): allow shimming the global env sooner (#40559) 2021-02-12 08:55:25 -08:00
tslint.json build: exclude build-worker file from formatting (#40012) 2020-12-08 12:06:53 -08:00
yarn.lock build: update dependency yargs to v17 (#41920) 2021-05-04 08:31:47 -07:00
yarn.lock.readme.md build: remove travisci leftovers (#27979) 2019-01-09 10:41:16 -08:00

README.md

Angular - The modern web developer's platform.

angular-logo
Angular is a development platform for building mobile and desktop web applications
using Typescript/JavaScript and other languages.

www.angular.io

Contributing Guidelines · Submit an Issue · Blog

CI status   Angular on npm   Discord conversation


Documentation

Get started with Angular, learn the fundamentals and explore advanced topics on our documentation website.

Advanced

Development Setup

Prerequisites

Setting Up a Project

Install the Angular CLI globally:

npm install -g @angular/cli

Create workspace:

ng new [PROJECT NAME]

Run the application:

cd [PROJECT NAME]
ng serve

Angular is cross-platform, fast, scalable, has incredible tooling, and is loved by millions.

Quickstart

Get started in 5 minutes.

Ecosystem

angular ecosystem logos

Changelog

Learn about the latest improvements.

Upgrading

Check out our upgrade guide to find out the best way to upgrade your project.

Contributing

Contributing Guidelines

Read through our contributing guidelines to learn about our submission process, coding rules and more.

Want to Help?

Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues labeled as help wanted or good first issue.

Code of Conduct

Help us keep Angular open and inclusive. Please read and follow our Code of Conduct.

Community

Join the conversation and help the community.

Love Angular badge

Love Angular? Give our repo a star ⬆️.