angular-docs-cn/packages/core/schematics/test
Kristiyan Kostadinov 7849fdde09 feat(router): add migration to update calls to navigateByUrl and createUrlTree with invalid parameters (#38825)
In #38227 the signatures of `navigateByUrl` and `createUrlTree` were updated to exclude unsupported
properties from their `extras` parameter. This migration looks for the relevant method calls that
pass in an `extras` parameter and drops the unsupported properties.

**Before:**
```
this._router.navigateByUrl('/', {skipLocationChange: false, fragment: 'foo'});
```

**After:**
```
this._router.navigateByUrl('/', {
  /* Removed unsupported properties by Angular migration: fragment. */
  skipLocationChange: false
});
```

These changes also move the method call detection logic out of the `Renderer2` migration and into
a common place so that it can be reused in other migrations.

PR Close #38825
2020-09-16 15:16:18 -07:00
..
google3 feat(router): add migration to update calls to navigateByUrl and createUrlTree with invalid parameters (#38825) 2020-09-16 15:16:18 -07:00
BUILD.bazel feat(router): add migration to update calls to navigateByUrl and createUrlTree with invalid parameters (#38825) 2020-09-16 15:16:18 -07:00
all-migrations.spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
dynamic_queries_migration_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
helpers.ts fix(migrations): do not incorrectly add todo for @Injectable or @Pipe (#37732) 2020-06-25 14:22:08 -07:00
line_mappings_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
missing_injectable_migration_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
module_with_providers_migration_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
move_document_migration_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
navigation_extras_omissions_migration_spec.ts feat(router): add migration to update calls to navigateByUrl and createUrlTree with invalid parameters (#38825) 2020-09-16 15:16:18 -07:00
project_tsconfig_paths_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
renderer_to_renderer2_migration_spec.ts feat(router): add migration to update calls to navigateByUrl and createUrlTree with invalid parameters (#38825) 2020-09-16 15:16:18 -07:00
static_queries_migration_template_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
static_queries_migration_usage_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
template_var_assignment_migration_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
undecorated_classes_with_decorated_fields_migration_spec.ts fix(migrations): do not incorrectly add todo for @Injectable or @Pipe (#37732) 2020-06-25 14:22:08 -07:00
undecorated_classes_with_di_migration_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00