Angular 未捕获(承诺中):TypeError:t.resolve不是Android应用程序上的scratch卡功能的函数setNativePromise
我们希望在我们的android应用程序中使用带有Angular的ionic 4开发刮刮卡功能 我们使用了以下插件:Angular 未捕获(承诺中):TypeError:t.resolve不是Android应用程序上的scratch卡功能的函数setNativePromise,angular,ionic4,Angular,Ionic4,我们希望在我们的android应用程序中使用带有Angular的ionic 4开发刮刮卡功能 我们使用了以下插件: npm install --save scratchcard-js 我们参考下面的网站 代码为: createNewScratchCard() { const scContainer = document.getElementById('js--sc--container') const sc = new ScratchCard('#js--sc--conta
npm install --save scratchcard-js
我们参考下面的网站
代码为:
createNewScratchCard() {
const scContainer = document.getElementById('js--sc--container')
const sc = new ScratchCard('#js--sc--container', {
scratchType: SCRATCH_TYPE.CIRCLE,
containerWidth: 300,//scContainer.offsetWidth,
containerHeight: 300,
imageForwardSrc: './assets/images/scratchcard.png',
htmlBackground: '<div class="cardamountcss"><div class="won-amnt">30</div><div class="won- text">Points<br>Won!</div></div>',
clearZoneRadius: 40,
nPoints: 30,
pointSize: 4,
callback: () => {
console.log('Now the window will reload !')
}
})
// Init
sc.init();
}
createNewScratchCard(){
const scContainer=document.getElementById('js--sc--container')
const sc=new ScratchCard(“#js--sc--container”{
scratchType:SCRATCH_TYPE.CIRCLE,
containerWidth:300,//scContainer.offsetWidth,
集装箱重量:300,
imageForwardSrc:“./assets/images/scratchcard.png”,
htmlBackground:“30分
韩元!”,
净区半径:40,
nPoints:30,
点数:4,
回调:()=>{
log('现在窗口将重新加载!')
}
})
//初始化
sc.init();
}
但我还是犯了一个错误
我们如何在Android应用程序中实现scratch卡功能
需要帮助
提前谢谢