ionic3

Ionic v3: Group list by date/day

时光总嘲笑我的痴心妄想 提交于 2019-12-04 15:50:06
In good old version 1 of Ionic I was able to build an event-list grouped by date like this: <ion-list ng-repeat="(key, value) in events| groupBy: 'event.date'"> <div class="item item-divider" ng-if="value"> {{ ::key | event.date }} </div> <ion-item class="item" ng-repeat="event in value track by event.event.event_id"> {{ ::event.event.title }} </ionic-item> </ion-list> While the events object looks like this (event #1 and #3 share the same date): { "events": [ { "id": 1, "date": "2017-12-26", "title": "First event" }, { "id": 2, "date": "2017-12-30", "title": "Second event" }, { "id": 3, "date

Singletons in Ionic 3, Angular 4

痴心易碎 提交于 2019-12-04 15:27:45
问题 I am defining service as class, something like this: @Injectable() export class MyService { ... } In other components or pages, I am importing that class with just import command. import { MyService } from '../pages/services/myservice'; In constructor: constructor(public _MyService: MyService) In my main app.module.ts I have added that class service as provider. providers: [someOtherThings, MyService, someOtherThings] In Ionic 2, things are working as expected. Service is singleton. But in

How to read firebase push notification content and fire a method in ionic2?

好久不见. 提交于 2019-12-04 15:01:36
Is it possible to access push notification content in ionic 2 and execute bunch of code when notification arrive or event fire ? I'd recommend using the cordova-plugin-firebase instead. You can take a look at this repo to see how to use that plugin. Please notice that you'd need first to configure the firebase console, and donwload the .json / .plist files and add them to the root folder of your Ionic app. Then you can start using the plugin. In the demo everything is done in the app.component.ts file, but I recommend creating a PushNotificationService to keep everything organised. Please also

ionic 3 Build failed for task :processDebugManifest

百般思念 提交于 2019-12-04 14:50:23
I am having trouble in building my ionic 3 app. Every time I try to build the android app it gives the following error. * What went wrong: Execution failed for task ':processDebugManifest'. > Manifest merger failed : Attribute meta-data#android.support.VERSION@value val ue=(25.3.1) from [com.android.support:appcompat-v7:25.3.1] AndroidManifest.xml:2 7:9-31 is also present at [com.android.support:support-v4:26.0.0-alpha1] Androi dManifest.xml:27:9-38 value=(26.0.0-alpha1). Suggestion: add 'tools:replace="android:value"' to <meta-data> element a t AndroidManifest.xml:25:5-27:34 to override. My

Ionic 3: Menutoggle keeps getting hidden

社会主义新天地 提交于 2019-12-04 14:22:36
I have implemented a hamburgermenu in Ionic 3, but I am facing an issue. When I run the application on my Android device the hamburgermenu keeps disappearing i.e. the button to open the side menu is gone. However, it only happens sometimes. I tried to run the application while inspecting it with Google Chrome, and what I noticed is that the menutoggle gets hidden for some reason, but I don't know why. I don't control the visibility in the .ts class. <ion-header> <div> <ion-navbar> <button ion-button menuToggle> // this becomes "<button ion-button menuToggle hidden>" <ion-icon name="menu"></ion

how to open (doc, ppt, xlsx, pdf, jpg ,png) file using ionic native file opener

扶醉桌前 提交于 2019-12-04 12:55:27
问题 i am developing Hybrid app using ionic. i want to open (doc, ppt, xlsx, pdf, jpg ,png) file from device internal or external storage using ionic native file opener plugin, but i'm able to open only pdf file using below code. i use application/pdf to open pdf, to open other files what shoud i replace at the place of application/pdf ? please help me. thank you. import { FileOpener } from '@ionic-native/file-opener'; constructor(private fileOpener: FileOpener) { } ... this.fileOpener.open('path

How to efficiently store and use Authentication in Ionic 3

限于喜欢 提交于 2019-12-04 12:14:23
问题 I'm currently developing an Ionic (3.4) app for iOS/Android. I'm not familiar with authentification processes or with applications. After using HTTP request in a provider, I get my object , the user. But I have absolutely no idea how to store it or to deal with it. What are the good practices: Am I suppose to just store the object in the provider and call in in every single page I have? Am I suppose to store it as a sort of global object in the app? Or am I suppose (as bellow) to transfer it

Hide ion input validation border in IONIC-3 [duplicate]

好久不见. 提交于 2019-12-04 12:10:15
This question already has answers here : How to remove default color in input type? (3 answers) Closed last year . Im used ionic 3 , i want to know how to remove validation border color, red and green . I tried to removed, using this css .item-inner { border-bottom-color: transparent !important; box-shadow: none !important; } its not work, that solution is removed every focus line , any one know how to remove only validation color If you want for all input fields: You can override the following scss variables which are set by default for android material design: $text-input-highlight-color

showing Admob banner in Inappbrowser(ionic)

好久不见. 提交于 2019-12-04 11:13:59
After some research, I get to know that I can place AdMob ads into an application which is having an Android Webivew. I can able to integrate Banner ads into the apk where the ad is appearing at the bottom as expected. But once the url loads in the app, I am not able to see the banner. I'd checked in this link ( How to show AdMob banner in inappbrowser using Cordova/Ionic ) but It is with AngularJS(1) framework, I am looking for the same with Angular(5). Any help will be appreciated! 来源: https://stackoverflow.com/questions/53920545/showing-admob-banner-in-inappbrowserionic

Go to root page from a tab

不想你离开。 提交于 2019-12-04 11:09:46
问题 I would like to know how to go back to the rootPage defined in the appComponent when using tabs. The setRoot method is not working as I expected. When it is used in a Tab page the navigation stack is not cleared. On the 'home page', the back button is visible instead of the navigation toggle and the title of the tab is shown. By default, pages are cached and left in the DOM if they are navigated away from but still in the navigation stack (the exiting page on a push() for example). They are