From afb07ef97c1fab6e25fc4e23c8f9ba27a602cb6d Mon Sep 17 00:00:00 2001 From: dpalou Date: Tue, 13 Nov 2018 10:02:29 +0100 Subject: [PATCH] MOBILE-2726 siteplugins: Let hide menu through Javascript --- .../compile/components/compile-html/compile-html.ts | 2 +- .../module-index/core-siteplugins-module-index.html | 10 +++++----- .../core-siteplugins-plugin-content.html | 2 +- .../components/plugin-content/plugin-content.ts | 7 ++++++- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/core/compile/components/compile-html/compile-html.ts b/src/core/compile/components/compile-html/compile-html.ts index 0fafec013..3a843fc91 100644 --- a/src/core/compile/components/compile-html/compile-html.ts +++ b/src/core/compile/components/compile-html/compile-html.ts @@ -53,9 +53,9 @@ export class CoreCompileHtmlComponent implements OnChanges, OnDestroy, DoCheck { @ViewChild('dynamicComponent', { read: ViewContainerRef }) container: ViewContainerRef; loaded: boolean; + componentInstance: any; protected componentRef: ComponentRef; - protected componentInstance: any; protected element; protected differ: any; // To detect changes in the jsData input. diff --git a/src/core/siteplugins/components/module-index/core-siteplugins-module-index.html b/src/core/siteplugins/components/module-index/core-siteplugins-module-index.html index 9e567b4fa..12b83b5e0 100644 --- a/src/core/siteplugins/components/module-index/core-siteplugins-module-index.html +++ b/src/core/siteplugins/components/module-index/core-siteplugins-module-index.html @@ -1,11 +1,11 @@ - - - - - + + + + + diff --git a/src/core/siteplugins/components/plugin-content/core-siteplugins-plugin-content.html b/src/core/siteplugins/components/plugin-content/core-siteplugins-plugin-content.html index 7088f7a30..c306b73a7 100644 --- a/src/core/siteplugins/components/plugin-content/core-siteplugins-plugin-content.html +++ b/src/core/siteplugins/components/plugin-content/core-siteplugins-plugin-content.html @@ -1,3 +1,3 @@ - + diff --git a/src/core/siteplugins/components/plugin-content/plugin-content.ts b/src/core/siteplugins/components/plugin-content/plugin-content.ts index 6ddaf6315..e1fa41f17 100644 --- a/src/core/siteplugins/components/plugin-content/plugin-content.ts +++ b/src/core/siteplugins/components/plugin-content/plugin-content.ts @@ -12,7 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import { Component, OnInit, Input, Output, EventEmitter, Optional, DoCheck, KeyValueDiffers } from '@angular/core'; +import { + Component, OnInit, Input, Output, EventEmitter, Optional, DoCheck, KeyValueDiffers, ViewChild, ElementRef +} from '@angular/core'; import { NavController } from 'ionic-angular'; import { CoreDomUtilsProvider } from '@providers/utils/dom'; import { CoreSitePluginsProvider } from '../../providers/siteplugins'; @@ -26,6 +28,9 @@ import { Subject } from 'rxjs'; templateUrl: 'core-siteplugins-plugin-content.html', }) export class CoreSitePluginsPluginContentComponent implements OnInit, DoCheck { + // Get the compile element. Don't set the right type to prevent circular dependencies. + @ViewChild('compile') compileComponent: ElementRef; + @Input() component: string; @Input() method: string; @Input() args: any;