我在app上使用原生文件插件。Ionic 3你能告诉我如何在它上面使用getFile ()方法吗?我找不到那个方法的正确实现。它的签名如下。但我不知道如何给出directoryEntry参数。
getFile(directoryEntry, fileName, flags)
Run Code Online (Sandbox Code Playgroud) 目前 Ionic Ionic Framework没有任何标志图标rupee。
谁能告诉我如何rupee使用显示标志ion-icon?
我尝试了谷歌的许多不同解决方案来反映新的变化,但没有运气。
尝试过的事情。
- 平台删除并再次添加
- 删除 APK 文件
- 在 index.html 中设置缓存关闭
- 在配置文件中更改版本
- 修改 app_id
- 等等。
ionic info
global packages:
@ionic/cli-utils : 1.4.0
Cordova CLI : 7.0.1
Ionic CLI : 3.4.0
local packages:
@ionic/app-scripts : 1.3.7
@ionic/cli-plugin-cordova : 1.4.0
@ionic/cli-plugin-ionic-angular : 1.3.1
Cordova Platforms : android 6.2.3 browser 4.1.0
Ionic Framework : ionic-angular 3.4.0
System:
Node : v6.11.0
OS : Windows 7
Xcode : not installed
ios-deploy : not installed
ios-sim : not installed
npm : 5.0.3
Run Code Online (Sandbox Code Playgroud) 屏蔽ion-input元素的最佳方法是什么?例如电话号码......像这样:
<ion-input type="tel" placeholder="celular" name="celular"
[(ngModel)]="phone_number" required
mask="(**)*****-****" ></ion-input>
Run Code Online (Sandbox Code Playgroud) 我需要调整标题大小,我该怎么做?我尝试了一些 css 样式,但没有用。
我要成就小
谢谢!
编辑:这是我的代码,希望这有助于...
再次感谢,如果您需要更多详细信息,请告诉我
………………………………………………………………………………………………………………………………………………………… ………………………………………………………………………………………………………………………………………………………… …………
page-home {
ion-navbar{
width: 100%;
}
ion-title img{
padding-left: 10px;
}
img.logo{
padding-left: 110px;
height: 20px;
}
p.title{
font-size: 15px!important;
padding-top: 10px;
padding-left: 110px;
}
ion-content{
margin-left: 100px;;
margin-top: 40px;
}
ion-grid{
text-align: center;
}
ion-row.header-row{
text-align: center;
font-weight: bold;
}
ion-col.header-col{
background-color: #eee;
border:1px solid #ddd!important;
}
ion-col.info-col{
background-color: #fff;
border:1px solid #ddd!important;
}
ion-col.col-align{
padding-top: 14px;
}
.button{
width: 90px;
}
}Run Code Online (Sandbox Code Playgroud)
<ion-header>
<ion-navbar>
<ion-title>
<img alt="logo" class="logo" …Run Code Online (Sandbox Code Playgroud)我正在创建一个离子应用程序,其中我添加了自动播放滑块,在应用程序主页中显示客户的故事。点击主页中有各种卡片,用户可以通过这些卡片导航到相应的页面。现在,当返回主页时,滑块自动播放停止。以下是我的代码的基本片段。
<ion-slides autoplay="2000" loop="true" speed="3000" class="slides" pager="true">
<ion-slide>
<img src="assets/img/slide1.jpg">
</ion-slide>
<ion-slide>
<img src="assets/img/slide2.jpg">
</ion-slide>
<ion-slide>
<img src="assets/img/slide3.jpg">
</ion-slide>
</ion-slides>
Run Code Online (Sandbox Code Playgroud)
我已经试过了内置的滑块的方法,如update()与startAutoplay()在ionicViewDidEnter()功能
ionViewDidEnter(){
console.log("View Entered");
this.slides.update(); // or this.slides.startAutoplay()
}
Run Code Online (Sandbox Code Playgroud)
但他们都没有工作。带有代码的描述性答案将对我的理解和未来的参考非常有帮助。谢谢
所以我试图从 AlertController 获取输入,但我不确定如何在 Typescript 中做到这一点。
ionViewDidLoad(){
// Presenting popup
this.alert.create({
title:'Enter Details',
inputs:[{
//phNo:'Enter Mob No. E.g.919090998302',
//placeholder: 'pNo',
name:'username',
placeholder: 'username'
},{
name: 'number',
placeholder: 'PNo',
}],
buttons:[{
text: 'Continue',
handler: username =>{
if(typeof username!=null){
this.name = username,
this.phNo = number
}
}
}]
}).present();
Run Code Online (Sandbox Code Playgroud)
我需要在单击按钮后立即获取第二个输入值,但我不确定如何在此执行此操作,其中显示Cannot find name "number".
我知道 Stackoverflow、离子论坛和其他地方提供的解决方案。但是当我在 Android 和 IOS 上测试时,这些都不适合我。
https://ionicframework.com/docs/native/call-number/
让我向您展示我遵循的确切步骤:
1) ionic cordova 插件添加电话号码
2) npm install --save @ionic-native/call-number
3)import在 app.module.ts 中添加import { CallNumber } from '@ionic-native/call-number';
4) 添加提供者 CallNumber
5)最后,
import { CallNumber } from '@ionic-native/call-number';
constructor(private callNumber: CallNumber) { }
...
this.callNumber.callNumber("18001010101", true)
.then(() => console.log('Launched dialer!'))
.catch(() => console.log('Error launching dialer'));
Run Code Online (Sandbox Code Playgroud)
我什至尝试使用 async 和 promise :
async telephoneCall(): Promise<any>{
try{
await this.callNumber.callNumber(String('18001010101'), true);
}catch(e){
console.log("User Error: "+ e);
}
}
Run Code Online (Sandbox Code Playgroud)
上述解决方案都不会在编译时或运行时引发错误。我不确定出了什么问题。我正在使用 Ionic 3 和 Angular …
我正在使用CSDK 图像编辑器来编辑图像。这是编辑图像的方法:-
CSDKImageEditor.edit(success, error, imageUrl, options);
Run Code Online (Sandbox Code Playgroud)
所以在成功方法编辑器返回图像 url,它是本机格式,如:-
content://media/23
Run Code Online (Sandbox Code Playgroud)
编辑后我需要删除该文件。所以我使用Cordova File来删除文件。由于这是本机网址,因此cordova 文件无法使用该网址找到该文件。通过谷歌后,我得到了一个插件Corodva Filepath来将本地 url 转换为文件 url,但是这个插件不起作用。安装插件后,我无法构建文件。
所以问题是,我需要删除文件,但我没有文件 url,我只有本地 url。请给我建议,以便我可以使用本机网址删除文件,或者我可以将本机网址转换为 Ionic1 中的文件网址
我正在尝试修复屏幕顶部的卡片。我正在尝试这样做,<ion-content>但经过多次尝试后我没有解决它。我试过ion-fixed,但它也不起作用。
我想修复这部分代码:
<ion-card text-center>
<ion-card-content>
<h5 style=" font-size: 180%;"> {{selectedItem | noneSelectedItem}}
</h5>
</ion-card-content>
</ion-card>
Run Code Online (Sandbox Code Playgroud)
然后,它遵循一个列表:
<ion-card style="background-color:rgb(177, 55, 47);" >
<br>
<p class="titleCard">Lista de la carta</p>
<ion-card-content>
<ion-list class="accordion-list" >
<!-- First Level -->
<ion-list-header *ngFor="let item of information; let i = index" no-lines no-padding>
<!-- Toggle Button -->
<button ion-item (click)="toggleSection(i)" detail-none [ngClass]="{'section-active': item.open, 'section': !item.open}">
<ion-icon item-left name="arrow-forward" *ngIf="!item.open"></ion-icon>
<ion-icon item-left name="arrow-down" *ngIf="item.open"></ion-icon>
{{ item.name }}
</button>
etc...
Run Code Online (Sandbox Code Playgroud)
所以我的疑问是如何在滚动列表时修复第一张卡片。
非常感谢。
ionic-framework ×10
angular ×5
ionic3 ×4
cordova ×3
ionic2 ×3
android ×2
css ×2
css-position ×1
font-awesome ×1
fonts ×1
ionic-native ×1
scroll ×1
styles ×1
typescript ×1