Open BeMor81 opened 6 years ago
popup.showPopup(args.object,'~/components/thread/context.xml');
This works on android for me.
I think the problem is that this doesn't work with Angular. When using this from the demo
showTemplatePopup(args) {
this._showPopup(this.page.getViewById('btn'), '~/template/bomb.html');
}
I get Error: Expecting a valid View instance.
and when I try
showPopupList() {
const listPath = fs.path.join(
fs.knownFolders.currentApp().path,
'/template/list.html'
);
const component = builder.load(listPath);
component.bindingContext = this;
this._showPopup(this.page.getViewById('btnList'), component);
}
the component is undefined but I believe that is because ui/builder
is intended for NativeScript core applications and not Angular.
I am also getting undefined, but I'm using a nativescript core app
Tested only on Android emulator, tns version 3.4.1. Getting the following error when passing a template path as source.
JS: ERROR Error: Uncaught (in promise): Error: Expecting a valid View instance. JS: Error: Expecting a valid View instance. JS: at StackLayout.ViewBase._addView (file:///data/data/com.m.myapp/files/app/tns_modules/tns-core-modules/ui/core/view-base/view-base.js:337:19) [angular]