ionic3

Ionic : Ion-slides- Only First Slide appearing

送分小仙女□ 提交于 2020-06-17 09:51:01
问题 I'm trying to add ion-slides to my app, but i'm facing a problem that i don't have any idea how to solve it. I simple added the ion-slides example to my page: <ion-slides> <ion-slide> <h1>Test</h1> </ion-slide> <ion-slide> <h1>Test2</h1> </ion-slide> <ion-slide> <h1>Test3</h1> </ion-slide> </ion-slides> And even with this simple example, the component just shows the first slide. When i try to swipe to the next one, it shows a blank slide, even though it's possible to inspect this element and

ion-select not showing selected option with FormBuilder (Ionic 3)

六眼飞鱼酱① 提交于 2020-06-16 11:18:24
问题 Take the following html <form [formGroup]="detailsForm"> <ion-list> <ion-item> <ion-label>Gaming</ion-label> <ion-select formControlName="gaming"> <ion-option value="nes">NES</ion-option> <ion-option value="n64">Nintendo64</ion-option> <ion-option value="ps">PlayStation</ion-option> <ion-option value="genesis">Sega Genesis</ion-option> <ion-option value="saturn">Sega Saturn</ion-option> <ion-option value="snes">SNES</ion-option> </ion-select> </ion-item> </ion-list> </form> And in your

Property 'coords' does not exist on type 'MouseEvent'. In Angular2-google-maps marker event

你。 提交于 2020-06-12 05:41:08
问题 I have added mapClicked event of angular2-google-maps map. The code is as below: mapClicked($event: MouseEvent) { this.markers.push({ lat: $event.coords.lat, lng: $event.coords.lng, draggable: false }); } I am getting compile time error while serving my ionic 2 app with "ionic serve". Thanks in advance, AB 回答1: This is just Typescript complaining since the default MouseEvent interface doesn't have the coords property, but since you're using angular2-google-maps you know the coords property

Why white screen stuck after splash screen in Ionic 4?

时间秒杀一切 提交于 2020-06-08 07:16:13
问题 I run ionic cordova run android for my Ionic Cordova project. At this time, I have my mobile connected to PC via USB. So when I run that command, it installs the app on my real device Android Redmi Note 6 PRO. But what really happens is when the app opens, only white screen appears, nothing else at all. First it shows splash screen and then white screen forever. Why does this behaviour happen? I read somewhere that some people had this problem because of Ionic 4. Below are my logcat logs from

Show a ion-menu in ionic3 without routing and without gestures

左心房为你撑大大i 提交于 2020-06-01 05:14:27
问题 I'm trying to implement a side menu like the one shown in the ion-menu component page. I just want to show the side menu programmatically, I don't mean to trigger navigation from it or have a burger button in the top bar. I use neither ion-router-outlet nor any other routing systems. I tried copying and pasting the example on the page, but what I get is an error in console: menu.js:292 Menu: must have a [content] element to listen for drag events on. Example: <ion-menu [content]="content">

Ionic change background color of div by code

跟風遠走 提交于 2020-05-29 07:34:08
问题 How to change the color of a div in code dynamically in ionic by using code? 回答1: If it's just a single style, you can use property binding for this. In your component: public aColor: string = "#ccc"; And then in the view: <div [style.background-color]="aColor"></div> Please take a look at the ngStyle docs for more info if you need to set more than one style dynamically: <some-element [ngStyle]="{'font-style': styleExp}">...</some-element> <some-element [ngStyle]="{'max-width.px': widthExp}">

Ionic change background color of div by code

 ̄綄美尐妖づ 提交于 2020-05-29 07:33:37
问题 How to change the color of a div in code dynamically in ionic by using code? 回答1: If it's just a single style, you can use property binding for this. In your component: public aColor: string = "#ccc"; And then in the view: <div [style.background-color]="aColor"></div> Please take a look at the ngStyle docs for more info if you need to set more than one style dynamically: <some-element [ngStyle]="{'font-style': styleExp}">...</some-element> <some-element [ngStyle]="{'max-width.px': widthExp}">

Angular 5 custom input pipe loses focus when deleting charcter

允我心安 提交于 2020-05-17 07:45:11
问题 I have an input in with a custom pipe that adds a space every 4 characters inserted. The issue is that if I insert for example "1234 5678" and I go and delete 4, the focus instead of staying there to insert a new character it moves to the end. PIPE import { Pipe, PipeTransform } from "@angular/core"; @Pipe({ name: 'formatBankAcc' }) export class FormatBankAccPipe implements PipeTransform { transform(value: string) { if (value != null) { value = value.replace(/[^\dA-Z]/g, '') .replace(/(.{4})

Fabs With Labels In Ionic 3

流过昼夜 提交于 2020-05-13 04:34:31
问题 I am using the Ionic 3 Framework and want to insert the following type of fab menu in my Ionic 3 App. Special Fab Menu: 回答1: In your SCSS file: button[ion-fab] { overflow: visible; position: relative; ion-label { position: absolute; top: -8px; right: 40px; color: white; background-color: rgba(0,0,0,0.7); line-height: 24px; padding: 4px 8px; border-radius: 4px; } } .fab{ contain: layout; } Your HTML file: <ion-fab bottom right > <button ion-fab>Share</button> <ion-fab-list side="top"> <button

Fabs With Labels In Ionic 3

时光总嘲笑我的痴心妄想 提交于 2020-05-13 04:34:28
问题 I am using the Ionic 3 Framework and want to insert the following type of fab menu in my Ionic 3 App. Special Fab Menu: 回答1: In your SCSS file: button[ion-fab] { overflow: visible; position: relative; ion-label { position: absolute; top: -8px; right: 40px; color: white; background-color: rgba(0,0,0,0.7); line-height: 24px; padding: 4px 8px; border-radius: 4px; } } .fab{ contain: layout; } Your HTML file: <ion-fab bottom right > <button ion-fab>Share</button> <ion-fab-list side="top"> <button