沒有右邊的小角標(biāo)
button ion-item (click)="checkNewVersion()" detail-none></button>
inpout發(fā)送短信按
<ion-item>
<ion-label>手機(jī)驗(yàn)證</ion-label>
<ion-input type="number" [(ngModel)]="oCode" placeholder="請輸入手機(jī)驗(yàn)證碼"></ion-input>
<button class="sendBtn" ion-button item-end (click)="oldPhone()"></button>
</ion-item>
在ios content上不想下拉有回彈效果
<ion-content no-bounce></ion-content>
在安卓手機(jī)上ion-item Border不顯示,在variables.css
$hairlines-width:1px;
$list-border-color: #e0dfe4;
$toolbar-background: color($colors, dark);
tabs指定選中那個(gè)
<ion-tabs selectedIndex="1">
<ion-tab [root]="tab1Root" tabTitle="Home" tabIcon="home"></ion-tab>
<ion-tab [root]="tab2Root" tabTitle="About" tabIcon="information-circle"></ion-tab>
<ion-tab [root]="tab3Root" tabTitle="Contact" tabIcon="contacts"></ion-tab>
</ion-tabs>
鍵盤彈出tabs禁止擠上去
adjustPan|stateHidden
自定義返回按鈕事件
export class Page {
@ ViewChild(Navbar) navBar: Navbar; ①
ionViewDidLoad() { ②
this.navBar.backButtonClick = this.backButtonClick; ③
}
backButtonClick = (e: UIEvent) => {
// do something
this.navCtrl.pop();
}
}
返回指定頁面
this.navCtrl.popTo(this.navCtrl.getByIndex(this.navCtrl.length() - 3));
this.navCtrl.length() - 3 //通過計(jì)算得到指定頁面
生成啟動(dòng)圖標(biāo)命令
ionic cordova resources [platform]
中文的 ¥
¥
極光推送打開指定頁面
this.jPushPlugin.openNotification()
.subscribe( res => {
this.jPushPlugin.setApplicationIconBadgeNumber(0);
this.nav.push('TabsPage');
});
如果你需要不帶任何符號(hào)的純數(shù)字鍵盤筛严,可以用 pattern 屬性用正則表達(dá)式將輸入的內(nèi)容限定位純數(shù)字
<ion-input type="number" pattern="[0-9]*" value=""></ion-input>
手機(jī)連接chorme瀏覽器調(diào)試
chrome://inspect/#devices
alert框塞蹭,點(diǎn)擊空白地方禁止隱藏彈框
enableBackdropDismiss
監(jiān)聽app進(jìn)入前臺(tái)
platform.resume.subscribe(() => {
alert('進(jìn)入前臺(tái)')
});
點(diǎn)擊跳轉(zhuǎn)指定Tabs頁面
this.navCtrl.parent.select(2);
使用jquery
npm install jquery --save
npm install @types/jquery --save
declare let $: any; //使用的頁面
內(nèi)置瀏覽器在ios加載頁面沉浸問題
https://stackoverflow.com/questions/47848602/ionic-plugin-themeablebrowser-offset-issue-on-iphone-x
ionic接入第三方登陸