首页 > 解决方案 > 使用 Angular 在 Nativescript 中弹出菜单

问题描述

我使用nativescript-menu为 Android 添加弹出菜单。

但我收到下一个错误:无法将索引 1 处的 JavaScript 参数 [object Object] 编组为 Java 类型。这是代码:

 Menu.popup({
    view: this.page.getViewById("menuBtn"),
    actions: ["Example", "NativeScript", "Menu"]
}).then(action => {
      console.log(action);
  }).catch(error => {
      console.log(error.message);
  });

标签: angularnativescript

解决方案


推荐阅读