【问题标题】:exec proxy not found for NativePageTransitions找不到 NativePageTransitions 的 exec 代理
【发布时间】:2017-08-10 09:41:20
【问题描述】:

我已经用 cli 添加了插件 github.com.

这是我的代码

 <button onclick="slide('right', 'dashboard.html')">back</button>


 <script type="text/javascript"> 
    function slide(direction,href) {
      window.plugins.nativepagetransitions.slide(
      {
        'duration': 400,
        'direction': direction,
        'iosdelay': 50,
        'androiddelay': 120,
        'winphonedelay':800,
        'href': href
      },
      function () {
        console.log('slide transition finished');
      });
    }

</script> 

而且我已经添加了

<script type="text/javascript" src="cordova.js"></script>

这是我的完整代码 pastebin.com

但不工作,我在控制台上有错误 找不到 NativePageTransitions 的执行代理

【问题讨论】:

    标签: javascript html phonegap-plugins phonegap


    【解决方案1】:

    在 JS 中你只有一个 1:

    function slide(href)
    

    但在你的 html 中你有 2 个:

    slide('right', 'dashboard.html')
    

    【讨论】:

    • 仍然无法正常工作,我在我的 javascript 和 html 中添加了两个参数
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-08
    • 1970-01-01
    相关资源
    最近更新 更多