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; }());