"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/core/schematics/migrations/router-preserve-query-params/README.md" between
angular-11.0.1.tar.gz and angular-11.0.2.tar.gz

About: Angular is a development platform for building mobile and desktop web applications using Typescript/JavaScript.

README.md  (angular-11.0.1):README.md  (angular-11.0.2)
## Router's NavigationExtras.preserveQueryParams migration ## Router's NavigationExtras.preserveQueryParams migration
Previously the `NatigationExtras` property of `preserveQueryParams` defined what should be done with Previously the `NatigationExtras` property of `preserveQueryParams` defined what should be done with
query parameters on navigation. This migration updates the usages of `preserveQ ueryParams` to query parameters on navigation. This migration updates the usages of `preserveQ ueryParams` to
instead use the `queryParamsHandler` property. instead use the `queryParamsHandling` property.
#### Before #### Before
```ts ```ts
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
@Component({}) @Component({})
export class MyComponent { export class MyComponent {
constructor(private _router: Router) {} constructor(private _router: Router) {}
skipping to change at line 32 skipping to change at line 32
#### After #### After
```ts ```ts
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
@Component({}) @Component({})
export class MyComponent { export class MyComponent {
constructor(private _router: Router) {} constructor(private _router: Router) {}
goHome() { goHome() {
this._router.navigate('/', { queryParamsHandler: 'preserve', skipLocationCha nge: 'foo' }); this._router.navigate('/', { queryParamsHandling: 'preserve', skipLocationCh ange: 'foo' });
} }
} }
``` ```
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)