From ed8ffdc97da9f26088d352d5fe104c41354f9463 Mon Sep 17 00:00:00 2001 From: Alberto Date: Tue, 3 Oct 2017 14:24:27 +0200 Subject: [PATCH] Merge branch 'latest' into 13.3.0 # Conflicts: # aot/dist/agGridColumn.ngfactory.ts # aot/dist/agGridColumn.ngsummary.json # aot/dist/agGridNg2.ngfactory.ts # aot/dist/agGridNg2.ngsummary.json # aot/dist/aggrid.module.ngfactory.ts # aot/dist/aggrid.module.ngsummary.json # aot/dist/baseComponentFactory.ngsummary.json # aot/dist/interfaces.ngsummary.json # aot/dist/ng2ComponentFactory.ngsummary.json # aot/dist/ng2FrameworkComponentWrapper.ngsummary.json # aot/dist/ng2FrameworkFactory.ngsummary.json # aot/main.ngsummary.json --- lib/aureliaFrameworkComponentWrapper.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/aureliaFrameworkComponentWrapper.js b/lib/aureliaFrameworkComponentWrapper.js index df381dd..9f99023 100644 --- a/lib/aureliaFrameworkComponentWrapper.js +++ b/lib/aureliaFrameworkComponentWrapper.js @@ -106,7 +106,18 @@ var BaseGuiComponent = /** @class */ (function () { return false; }; BaseGuiComponent.prototype.getFrameworkComponentInstance = function () { - return this._frameworkComponentInstance; + var controllers = this._view.controllers; + //only one controller is allowed in editor template + if (controllers && + controllers.length == 1 && + controllers[0].viewModel) { + var editorVm = controllers[0].viewModel; + //this is a 'hack' because we don't have params.bind="" in the template + //must reset params or it will be nothing + editorVm.params = this._params; + return editorVm; + } + return null; }; return BaseGuiComponent; }());