我有一台需要通过 WiFi 连接到我的 Android 设备的热敏打印机。我需要在触发按钮时自动打印它(没有打印对话框)
目前,我使用的是 Ionic 4,但我找不到任何支持 ESC/POS 语言的库。我可以使用任何图书馆?
注意:以下解决方案适用于 Ionic 4 和 5。
我正在为我的应用程序构建推送通知,但是当我在设备上运行我的应用程序时,我收到以下错误:
vendor-es2015.js:101693 Native: tried calling FCM.getToken, but the FCM plugin is not installed.
pluginWarn @ vendor-es2015.js:101693
vendor-es2015.js:101699 Install the FCM plugin: 'ionic cordova plugin add cordova-plugin-fcm-with-dependecy-updated'
pluginWarn @ vendor-es2015.js:101699
vendor-es2015.js:101693 Native: tried calling FCM.onNotification, but the FCM plugin is not installed.
pluginWarn @ vendor-es2015.js:101693
vendor-es2015.js:101699 Install the FCM plugin: 'ionic cordova plugin add cordova-plugin-fcm-with-dependecy-updated'
pluginWarn @ vendor-es2015.js:101699
vendor-es2015.js:101693 Native: tried calling FCM.onTokenRefresh, but the FCM plugin is not installed.
pluginWarn @ vendor-es2015.js:101693
vendor-es2015.js:101699 Install the FCM plugin: 'ionic cordova plugin …Run Code Online (Sandbox Code Playgroud) I have a Cordova (not Capacitor) Ionic 5 app which I have been working on for a while and built many times. To check something on another project; someone gave me a a project which required Capacitor to build. It seems Capacitor has no cli build function so I was required to upgrade Android Studio to build from there. That worked.
But now I can no longer build my original project. It does run fine in the browser however.
There …
当我尝试在 ionic 5 中安装相机插件时,它会引发错误
[ng] 发生未处理的异常:目标入口点“@ionic-native/camera”缺少依赖项:[ng] - @ionic-native/core [ng] 参见“C:\Users\salini\AppData\Local \Temp\ng-PiL6u3\angular-errors.log”了解更多详情。不仅是相机,任何插件都可能会引发错误。
如果有人遇到同样的问题或知道解决方案,请告诉我。提前致谢
我在 Ionic 上使用 vue,代码如下:
data() {
return {
events: []
};
},
Run Code Online (Sandbox Code Playgroud)
模板:
<CardEvent
v-for="event of events"
:key="event.event_ID"
@click="router.push(`/home/evenement/` + event.event_ID)"
button
:title="event.event_title"
:picture="event.event_picture"
:addressExists="event.address_exists"
:day="event.event_day"
:month="event.event_month"
:isVirtual="event.is_virtual"
/>
Run Code Online (Sandbox Code Playgroud)
我有一个方法可以推送到我的事件数组:
loadMore() {
//Data here
this.events.push(response.data); // => error here
},
Run Code Online (Sandbox Code Playgroud)
在这一行我收到错误“ Argument of type 'any' is not assignable to parameter of type 'never'”
我看到我们可以做类似的事情:const result : string[] = []; 但是如何使用数据对象来实现这一点?
我在 ionic v6/v5 中创建带有多行文本的 ionic 按钮时遇到问题,问题是整个文本出现在一行中,并且部分文本未显示。就像stackblitz中的例子一样
<ion-button expand="block" size="large">
Lorem ipsum dolor sit amet, consectetur adipiscing elit.</ion-button>
Run Code Online (Sandbox Code Playgroud) 在我的项目中,我想使用带有标签和图标的“离子项目”。类似的东西:
<ion-item>
<ion-label>Itens</ion-label>
<ion-label><i class="icon-search"></i></ion-label>
</ion-item>
Run Code Online (Sandbox Code Playgroud)
问题是IOS默认已经在'ion-item'中使用了一个图标。我不想只为 android 更改按钮模式,我还是想使用原生元素样式。
我的问题是:有没有办法根据平台隐藏/显示元素?
我看到有人在谈论 Ionic 3 中的“showWhen”属性,但显然,它不再起作用了......
我在项目中遇到了一个问题, *ngFor 无法在模态组件内工作,而可以在其他任何地方工作。我在应用程序组件中导入 BrowserModule,在其他地方导入 commonModule。没有拼写错误。我确信该声明已明确声明。
错误是:
无法绑定到“ngForOf”,因为它不是“li”的已知属性
有什么帮助吗?