angular/packages/core/schematics/utils
Andrew Kushnir 16c8f55663 feat(router): migrate RouterLinkWithHref references to RouterLink (#47599)
Since Angular v15, the `RouterLink` contains the logic of the `RouterLinkWithHref` directive and now developers can always import and use the `RouterLink` directive when they need to add a `[routerLink]` in templates. This migration finds all imports and usages of the `RouterLinkWithHref` class and rewrites them to `RouterLink` instead.

```ts
import { RouterLinkWithHref } from '@angular/router';

@Component({
  standalone: true,
  template: `<a [routerLink]="'/abc'">`,
  imports: [RouterLinkWithHref]
})
export class MyComponent {
  @ViewChild(RouterLinkWithHref) aLink!: RouterLinkWithHref;
}
```

```ts
import { RouterLink } from '@angular/router';

@Component({
  standalone: true,
  template: `<a [routerLink]="'/abc'">`,
  imports: [RouterLink]
})
export class MyComponent {
  @ViewChild(RouterLink) aLink!: RouterLink;
}
```

PR Close #47599
2022-10-06 18:57:37 +00:00
..
tslint refactor: make all imports compatible with ESM/CJS output. (#43431) 2021-10-01 18:28:45 +00:00
typescript feat(router): migrate RouterLinkWithHref references to RouterLink (#47599) 2022-10-06 18:57:37 +00:00
BUILD.bazel refactor: remove no longer used prompts utils (#46587) 2022-06-29 10:31:18 -07:00
import_manager.ts feat(core): drop support for TypeScript 4.4 and 4.5 (#45394) 2022-03-24 10:51:47 -07:00
line_mappings.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
load_esm.ts refactor(migrations): support use of an ESM @angular/compiler-cli package (#43657) 2021-10-04 16:24:48 -07:00
ng_component_template.ts build: update to TypeScript 4.8 final (#47270) 2022-08-26 09:46:07 -07:00
ng_decorators.ts refactor: make all imports compatible with ESM/CJS output. (#43431) 2021-10-01 18:28:45 +00:00
parse_html.ts Revert "Revert "refactor(migrations): support use of an ESM @angular/compiler package (#43627)"" (#43637) 2021-09-29 14:46:03 -07:00
project_tsconfig_paths.ts fix(migrations): migration failed finding tsconfig file (#43343) 2021-09-07 23:16:56 +00:00
template_ast_visitor.ts Revert "Revert "refactor(migrations): support use of an ESM @angular/compiler package (#43627)"" (#43637) 2021-09-29 14:46:03 -07:00