ionic3

Icon not displayed inside input line in Ionic 3

女生的网名这么多〃 提交于 2019-12-03 00:22:34
问题 I have the following code in my Ionic 3 project. <ion-item> <ion-icon name="person" item-start></ion-icon> <ion-label floating>Email</ion-label> <ion-input type="email" name="email" [(ngModel)]="registerCredentials.email" required></ion-input> </ion-item> This gives me the following result. The icon in outside of the input line. Who to get it inside by keeping my Label floating. 回答1: You can fix that by placing the icon inside of the label, like this: <ion-item> <ion-label floating> <ion-icon

Ionic 3 can't use ion-* components inside my custom components

末鹿安然 提交于 2019-12-02 21:53:23
I have recently upgraded to Ionic 3 from Ionic 2, and I created components.module.ts file and declared and exported each custom component I have, and then imported this single file in every page module I have. So now the problem is that I can't use ion-* components inside my own components, because I did not imported the IonicModule.forRoot(..) inside my components.module. The error is: "Template parse errors: 'ion-spinner' is not a known element ..." What am I doing wrong? Alright, so I figured out the solution: All i needed was to import IonicModule in components.module , without forRoot(..)

How to fix the connection to the server was unsuccessful. (file ///android_asset/www/index.html)

淺唱寂寞╮ 提交于 2019-12-02 20:10:24
I've added material icons to ionic2 app , and since then I get error ""The connection to the server was unsuccessful. (file:///android_asset/www/index.html)"" although the css and fonts file of MaterialIcons are in the assets folder (I've install it locally) there is no call to " https://fonts.googleapis.com/icon?family=Material+Icons " what can I do ? Can I fix it or know why the timeout suddenly . Add <preference name="loadUrlTimeoutValue" value="60000" /> To config.xml Adding that ...value="70000" or "60000" line in config.xml isn't the best solution and it doesn't always work nor the

Ionic 3 RSS read with rss2json “Unprocessable Entity”

浪子不回头ぞ 提交于 2019-12-02 19:31:04
问题 I'm having trouble converting RSS to JSON using the rrs2json API with Ionic 3. If I execute the code it gives me the error --> Response {_body: "{" status ":" error "," message ":" rss_url parameter is required."} ", Status: 422, ok: false, statusText:" Unprocessable Entity "} Code: noticies.ts import { Component } from '@angular/core'; import { IonicPage, NavController, NavParams } from 'ionic-angular'; import { RssProvider } from '../../providers/rss/rss'; @IonicPage() @Component({ selector

Can't resolve all parameters for TranslateService: (?, ?, ?, ?, ?, [object Object]

淺唱寂寞╮ 提交于 2019-12-02 19:31:03
问题 I could not test my ionic 3 app in browser anymore since yesterday because I get the following error related to TranslateService . This seems not related to my code since I also face the same issue when I switch to my previous versions, although it worked fine at that moment. I tried to re-install the node modules with but still no luck. Do you know what I should do to solve this problem? Thanks! ERROR Error: Uncaught (in promise): Error: Can't resolve all parameters for TranslateService: (?,

Correct way to use image assets in Ionic 2

瘦欲@ 提交于 2019-12-02 17:53:20
What’s the best practice for image assets in Ionic 2? I have a bunch of SVGs I want to use as non-system icons. I found some older tips on using Gulp but it seems Ionic team has decided on Rollup as the build tool of choice, no docs on this so far. Somebody told me to just add them to www/img . Any downsides? AlexB Placing your images in www/img sounds like a good ideal but it will only work when serving locally using ionic serve . When building your app, the www/img will get deleted unless you make a gulp task to copy the images from the folder you want to the www/build folder as shown in

Lazy loading and components

人走茶凉 提交于 2019-12-02 17:44:05
问题 I'm moving my app to lazy loading and I found 2 ways of having components loaded. One is having X components and just one global components.module (e.g. https://www.9lessons.info/2017/12/ionic-angular-lazy-loading-child-components.html) that we'd need to import on our pages. But what happens if we just want one component? That's the other way which I saw on some @mhartington's repo. We could have again one .module per component as we have with pages: https://github.com/mhartington/lazyLoad2

Upgrading to AngularFire 5.0

吃可爱长大的小学妹 提交于 2019-12-02 16:13:37
问题 I'm using ionic 3 with firebase. Until now I use angularfire 4.0 and the following code gave me an observable for the data from firebase: obsToData: FirebaseObjectObservable<any>; constructor(public nav: NavController, public shared: SharedProvider, public DB: AngularFireDatabase) { this.obsToData = DB.object('/myData'); } now, according to this page FirebaseObjectObservable removed and I need to use AngularFireObject instead, how can I get the data? I did the following change: obsToData:

How to save a data array object to ionic SQlite storage (TypeScript, Angular 5, Ionic 3)

不羁的心 提交于 2019-12-02 15:56:08
问题 I'm trying to save a data array object with many attributes to a favorite list using Ionic SQlite storage. For instance, I have a data array in data provider: data.ts private options: any[] = [ { "name": "option 01", "website": "www.google.com", "about": "choose this option 01", "id": "1" }, { "name": "option 02", "website": "www.yahoo.com", "about": "choose this option 02", "id": "2" }, { "name": "option 03", "website": "www.bing.com", "about": "choose this option 03", "id": "3" }, { "name":

Ionic 3 prod release build issue with intellij-core-26.0.1

只谈情不闲聊 提交于 2019-12-02 15:54:08
I am creating release APK using the following versions : node - 8.12.0 gradle - 4.10.2 ionic CLI - 4.0.5 Cordova - 8.0.0 When I run the ionic cordova build android --prod --release I am getting the following error. FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':CordovaLib'. > Could not resolve all files for configuration ':CordovaLib:classpath'. > Could not find intellij-core.jar (com.android.tools.external.com-intellij:intellij-core:26.0.1). Searched in the following locations: https://jcenter.bintray.com/com/android/tools/external/com