ionic常用命令

ionic cordova prepare android 
ionic cordova run android -l


If the Logcat window is hidden, you can enable it in View » Tool Windows » Logcat.

File Protocol

Cordova and Capacitor apps are hosted on a local HTTP server and are served with the http:// protocol. Some plugins, however, attempt to access device files via the file:// protocol. To avoid difficulties between http:// and file://, paths to device files must be rewritten to use the local HTTP server. For example, file:///path/to/device/file must be rewritten as http://<host>:<port>/<prefix>/path/to/device/file before being rendered in the app.

For Cordova apps, the Ionic Web View plugin provides a utility function for converting File URIs: window.Ionic.WebView.convertFileSrc(). There is also a corresponding Ionic Native plugin: @ionic-native/ionic-webview.

For Capacitor apps, converting file URIs is very similar:

import { Capacitor } from '@capacitor/core'; Capacitor.convertFileSrc(filePath);

ionic cordova plugin add cordova-sqlite-storage

npm install @ionic-native/camera
ionic cordova plugin add cordova-plugin-camera

在项目根目录下执行npm i或cnpm i 就会安装package.json中的依赖

ng new hello --skip-install 新建不安装依赖

[innerHTML]=""

 

 

转载于:https://www.cnblogs.com/znsongshu/p/11437557.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值