From 270ece0b5e24416e7fda93f18120d3b3d676c819 Mon Sep 17 00:00:00 2001 From: "Manu Mtz.-Almeida" Date: Sun, 12 Aug 2018 18:38:30 +0200 Subject: [PATCH] refactor(loading): remove dismissOnPageChange closes #14930 --- angular/BREAKING.md | 8 ++++++++ core/src/components.d.ts | 8 -------- core/src/components/loading/loading-interface.ts | 1 - core/src/components/loading/loading.tsx | 5 ----- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/angular/BREAKING.md b/angular/BREAKING.md index dbbfd105f6..b5121e8c00 100644 --- a/angular/BREAKING.md +++ b/angular/BREAKING.md @@ -36,6 +36,7 @@ A list of the breaking changes introduced to each component in Ionic Angular v4. - [Item Sliding](#item-sliding) - [Label](#label) - [List Header](#list-header) +- [Loading](#loading) - [Menu Toggle](#menu-toggle) - [Modal](#modal) - [Nav](#nav) @@ -807,6 +808,13 @@ Previously an `ion-label` would automatically get added to an `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 ### Markup Changed diff --git a/core/src/components.d.ts b/core/src/components.d.ts index 91e1b54056..9bd0965d3f 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -1200,10 +1200,6 @@ declare global { * Dismiss the loading overlay after it has been presented. */ 'dismiss': (data?: any, role?: string | undefined) => Promise; - /** - * 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. */ @@ -4734,10 +4730,6 @@ declare global { * Additional classes to apply for custom CSS. If multiple classes are provided they should be separated by spaces. */ '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. */ diff --git a/core/src/components/loading/loading-interface.ts b/core/src/components/loading/loading-interface.ts index 14c468749f..274752effb 100644 --- a/core/src/components/loading/loading-interface.ts +++ b/core/src/components/loading/loading-interface.ts @@ -4,7 +4,6 @@ export interface LoadingOptions { content?: string; cssClass?: string | string[]; showBackdrop?: boolean; - dismissOnPageChange?: boolean; duration?: number; translucent?: boolean; } diff --git a/core/src/components/loading/loading.tsx b/core/src/components/loading/loading.tsx index d1e9703fb2..284328d8c8 100644 --- a/core/src/components/loading/loading.tsx +++ b/core/src/components/loading/loading.tsx @@ -54,11 +54,6 @@ export class Loading implements OverlayInterface { */ @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. */