ionic3

Ionic3 lazy loading and translate don't work together

半城伤御伤魂 提交于 2019-12-05 01:38:17
问题 Recently I upgraded the Ionic and now its Ionic3 Now the current application does not work with Ionic and ng2-translate altogether. The same code was working fine earlier without lazy loading, but we need to use lazy loading as to improve application loading time and reduce splash shown duration. The app.module.ts import component looks like TranslateModule.forRoot({ provide: TranslateLoader, useClass: TMATranslationLoader }) TMATranslationLoader looks like export class TMATranslationLoader

How to pop out ion-select using different button

被刻印的时光 ゝ 提交于 2019-12-05 01:33:35
How do I pop out the ion-select using different button? <ion-select [(ngModel)]="choices" multiple="true"> <ion-option>Appliances</ion-option> <ion-option>Automobile</ion-option> <ion-option>Cellphones</ion-option> <ion-option>Clothing</ion-option> <ion-option>Computers</ion-option> <ion-option>Electronics</ion-option> <ion-option>Toys</ion-option> </ion-select> You can ViewChild with ionic-angular html <ion-select [(ngModel)]="choices" multiple="true" #mySelect> <ion-option>Appliances</ion-option> <ion-option>Automobile</ion-option> <ion-option>Cellphones</ion-option> <ion-option>Clothing<

ionic3 - Invalid App Store Icon. The App Store Icon in the asset catalog in 'YourApp.app' can't be transparent nor contain an alpha channel

非 Y 不嫁゛ 提交于 2019-12-05 01:20:53
My ionic3 project build IOS successed, but when I upload it to itunes connect error showing then I try follow this ANSWER , but showing this for me find: convert: No such file or directory EDIT: I installed imagemagick using npm install imagemagick not brew install imagemagick then running find ./resources/ -name "*.png" -exec convert "{}" -alpha off "{}" \; showing find: convert: No such file or directory . Error solved!! Because of my ionic3 project contains icon alpha channel problem. And thanks to @Raptor. I tried to close icon alpha channel by photoshop . Delete ./resources/ios/icon all

How to show error messages in forms in Ionic 3

荒凉一梦 提交于 2019-12-05 01:00:41
问题 Here i have try to display error messages in forms in Ionic-3 . Here is my email.html file: <form [formGroup]="form" (submit)="signIn()"> <ion-grid> <ion-row> <ion-col> <ion-item> <ion-label color="primary" floating>Email</ion-label> <ion-input [formControl]="form.controls['email']"></ion-input> </ion-item> <p *ngIf="form.controls.email.errors && form.controls.email.dirty" class="danger" padding>Email is not valid.</p> </ion-col> </ion-row> </ion-grid> <ion-list padding> <ion-item> <button

Ionic conditional class css

余生颓废 提交于 2019-12-05 00:28:04
I am using Ionic3, and have: <span class="char-left">{{REVIEW_MAX_LENGTH-ratingModel.review.length}} characters left</span> I would like to conditionally change the class value when another value is populated, i.e when ratingForm.controls.review.length > 0 change the values to class="char-left-error" . I did look at ng-class , but cannot seem to get it to work. Any help appreciated. If it's just a single class, you can try with <span class="char-left" [class.char-left-error]="ratingForm.controls.review.length > 0"> By using ngClass it would look like <span class="char-left" [ngClass]="{'char

Ionic 3 ion-list horizontal - want to show a list ion-list horizontal

妖精的绣舞 提交于 2019-12-04 22:11:41
问题 I want to use Ionic 3 ion-list (or whatever works in Ionic 3) to show a horizontal list instead of the typical vertical list. Looking for a solution without a lot of css or hard to maintain code. <ion-content> <ion-list > <ion-item *ngFor="let data of dataArray" (click)="dataDetail(data)"> <ion-thumbnail item-left> <img src="https://data.url.com/{{data.path}}{{data.photoName}}"/> </ion-thumbnail> <h2>{{data.name}}</h2> <p>{{data.details}}</p> </ion-item> </ion-list> </ion-content> Any help is

How to create or customize a Toast view using ionic2 framework

。_饼干妹妹 提交于 2019-12-04 19:49:19
I am new to ionic2 development. Trying to show a toast message to the user, However using ionic2 framework am able to display only string message's in the toast view, I want to display a image and few other string in the form of customized view. How can i do that. I got this link from ionic site which says we can display string's. http://ionicframework.com/docs/v2/api/components/toast/ToastController/ Any suggestions ? I've been playing around with this, and I think I found a workaround, but please notice that this is just that, a workaround , and may cause some other things to break somehow.

ngx-translate - No provider for InjectionToken DocumentToken

北战南征 提交于 2019-12-04 19:49:06
I'm very new to ionic 3 and Angular 4. I'm trying to translate a page but when I run the app I get this error. I added the libraries and imported everything as the documentation said, and I added the translate service in the providers array in app module, but I still get this error app.module.ts import { BrowserModule } from '@angular/platform-browser'; import { ErrorHandler, NgModule } from '@angular/core'; import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular'; import {HttpClientModule, HttpClient} from '@angular/common/http'; import { MyApp } from './app.component'; import

After reseting plugins, Ionic 2 program doesn't work?

淺唱寂寞╮ 提交于 2019-12-04 19:47:43
I used many plugins in my Ionic 2 project. All things works fine before. But after launching ionic state reset --plugins , some objects cannot be found any more. I've used Beacon Plugin in my project. ----edit---- What it doesn't work is Cannot read property 'Delegate' of undefined in var delegate = new this.locationManager.Delegate(); ----edit---- The most weird thing is that ionic serve works (Browser), but ionic run android (Device) doesn't. ----edit---- After ionic platform rm android and ionic platform add android , still doesn't works. ----edit---- Doesn't work even I reinstall the

How to resize image in Ionic 3 without quality reduce and target width and height?

ε祈祈猫儿з 提交于 2019-12-04 19:36:07
I want to reduce the size of images taken by camera API but quality reduce is not good. The best thing is to reduce resolution but I don't want to use target width and height for all images. For example, I want image width be 1280 and image height change automatically by its ratio, but in API I should use exact width and height. How can I change height dynamic by image ratio??? For now, I use this code: this.camera.getPicture({ quality: 60, destinationType: this.camera.DestinationType.FILE_URI, sourceType: sourceType, mediaType: this.camera.MediaType.PICTURE, targetWidth: 1280, targetHeight: