2017-08-10 40 views
0

我已經添加了插件cli github.com未找到NativePageTransitions的執行代理

,這我的代碼

<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

,但不工作,我已經在控制檯 EXEC錯誤未找到NativePageTransitions代理

回答

0

在JS你只有1:

function slide(href) 

,但在你的HTML你有2個:

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

仍然沒有工作,我在JavaScript和添加兩個參數的html – Chielarck