refactor(loading): remove dismissOnPageChange

closes #14930
This commit is contained in:
Manu Mtz.-Almeida
2018-08-12 18:38:30 +02:00
parent d856ecfbbf
commit 270ece0b5e
4 changed files with 8 additions and 14 deletions

View File

@ -36,6 +36,7 @@ A list of the breaking changes introduced to each component in Ionic Angular v4.
- [Item Sliding](#item-sliding) - [Item Sliding](#item-sliding)
- [Label](#label) - [Label](#label)
- [List Header](#list-header) - [List Header](#list-header)
- [Loading](#loading)
- [Menu Toggle](#menu-toggle) - [Menu Toggle](#menu-toggle)
- [Modal](#modal) - [Modal](#modal)
- [Nav](#nav) - [Nav](#nav)
@ -807,6 +808,13 @@ Previously an `ion-label` would automatically get added to an `ion-list-header`
</ion-list-header> </ion-list-header>
``` ```
## Loading
`dismissOnPageChange` was removed. Fortunatelly all the navigation API is promise based and there are global events (`ionNavWillChange`) you can listen in order to detect when navigation occurs.
You should take advantage of these APIs in order to dismiss your loading overlay explicitally.
## Menu Toggle ## Menu Toggle
### Markup Changed ### Markup Changed

View File

@ -1200,10 +1200,6 @@ declare global {
* Dismiss the loading overlay after it has been presented. * Dismiss the loading overlay after it has been presented.
*/ */
'dismiss': (data?: any, role?: string | undefined) => Promise<void>; 'dismiss': (data?: any, role?: string | undefined) => Promise<void>;
/**
* If true, the loading indicator will dismiss when the page changes. Defaults to `false`.
*/
'dismissOnPageChange': boolean;
/** /**
* Number of milliseconds to wait before dismissing the loading indicator. * Number of milliseconds to wait before dismissing the loading indicator.
*/ */
@ -4734,10 +4730,6 @@ declare global {
* Additional classes to apply for custom CSS. If multiple classes are provided they should be separated by spaces. * Additional classes to apply for custom CSS. If multiple classes are provided they should be separated by spaces.
*/ */
'cssClass'?: string | string[]; 'cssClass'?: string | string[];
/**
* If true, the loading indicator will dismiss when the page changes. Defaults to `false`.
*/
'dismissOnPageChange'?: boolean;
/** /**
* Number of milliseconds to wait before dismissing the loading indicator. * Number of milliseconds to wait before dismissing the loading indicator.
*/ */

View File

@ -4,7 +4,6 @@ export interface LoadingOptions {
content?: string; content?: string;
cssClass?: string | string[]; cssClass?: string | string[];
showBackdrop?: boolean; showBackdrop?: boolean;
dismissOnPageChange?: boolean;
duration?: number; duration?: number;
translucent?: boolean; translucent?: boolean;
} }

View File

@ -54,11 +54,6 @@ export class Loading implements OverlayInterface {
*/ */
@Prop() cssClass?: string | string[]; @Prop() cssClass?: string | string[];
/**
* If true, the loading indicator will dismiss when the page changes. Defaults to `false`.
*/
@Prop() dismissOnPageChange = false;
/** /**
* Number of milliseconds to wait before dismissing the loading indicator. * Number of milliseconds to wait before dismissing the loading indicator.
*/ */