Search Posts

Category: ionic-framework

Disable ion List line element if specific value condition match

how to Disable ion List line element if specific value condition match <ion-col col-9> <ion-list> <!– ng-Disabled=”customer.lsl_job_status==’Completed'” ng-Click=”measurementEntry(customer.lsl_lsh_sys_id , customer.lsl_sys_id ,customer.lsl_comp_code)” –> <ion-item ng-if=”customer.lsl_job_status==’Completed'” (click)=”measurementEntry(customer.lsl_sys_id ,customer.lsl_comp_code)” > <h1>{{customer.lsl_contact_person}}, SC_L: {{customer.lsl_sys_id }}</h1> <h2>Contact No : {{customer.lsl_contact_no}} Company: {{customer.lsl_comp_code}}</h2> </ion-item> </ion-list> </ion-col> How to disable a list element when customer.lsl_job_status is completed. ?? Source: AngularJS

Ionic 3 with Firebase reCaptcha in a browsertab & redirect back to application

I’m trying to implement signInWithPhoneNumber using firebase, I’ve successfully managed it on a browser but due to ionic not being recognized as a known platform, it can’t render the recaptcha on the application. So I was forced to use an alternative, I created a site with firebase hosting which implements the recaptcha & using the browsertab native plugin from Google to open that link. Now my question is how do I get the response from […]

Adding marker to google map in Ionic Application

I’ve been following this helpful tutorial – https://www.joshmorony.com/ionic-2-how-to-use-google-maps-geolocation-video-tutorial/. Everything works great. However, this example prompts the user to add a marker to the google map by clicking on a button. I want the marker to be automatically added after the map loads in the view. However, I’m receiving the error cannot read propery of getCentre of undefined I’m quite sure that is telling me that it is attempting to add the marker before the map […]

RxJs Observables problems

So basically I have an Ionic mobile application. data are retrieved from firebase database using RxJS Observables. I wanted to put a search feature in one of my modules but im having a hard time because of observables retrieving data in real time, my initial logic is to push the retrieved data in an array and that array will be the basis for the search feature. Is there any other way? initializeItems() { this.travelList$ = […]

ViewDestroyed error when change detection done on an active component

Here is the work flow of my Ionic app. App starts with Welcome Page – > Login -> Service on background checks for new notification and emits a “new-event” -> After login, Home page -> New page which is subscribed to “new-event” triggers a change detection. But I get an error ViewDestroyedError: Attempt to use a destroyed view: detectChanges Here is the relevant code. WelcomePage login(){ this.auth.login().then(()=>{ this.navCtrl.setRoot(‘TabsPage’); }) } TabPage has a HomePage which […]

How to Display Navbar In Webview (InAppBrowser) in IONIC

Im develop Mobile With IONIC Cordova, and Im very beginner in this.. i want to question How to Display Navbar in Page Webview, my page webview use InAppBrowser. this is my page.html <ion-header> <ion-navbar> <button ion-button menuToggle> <ion-icon name=”menu”></ion-icon> </button> <ion-title>WV</ion-title> </ion-navbar> </ion-header> <ion-content padding> </ion-content> this my page.ts @IonicPage() @Component({ selector: ‘page-wv’, templateUrl: ‘wv.html’, }) export class WvPage { my_url: any; constructor(public navCtrl: NavController, public navParams: NavParams, private IAB: InAppBrowser) { } ionViewDidLoad() { […]

how to inject ionicContentBanner into Jasmine tests

I have a controller which has a bunch of dependencies injected in it. I am able to inject most of them successfully into my jasmine test however, some of my UI specific libraries, like videogular, ionic tinder cards and ionic content banners are failing to inject. This question focus’s on $ionicContentBanner and maybe I can get the rest to work. Here is my controller I am trying to test – I have omitted most of […]

How retrive a value from JSON object sent by server in Ionic 3

So basically I’m requesting a post request to the server which in return, send a token in JSON object in this form: { token: “eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjIyLCJpc3MiOiJodHRwczovL2hvYnVkZGllcy5jb20vYXBpL2F1dGgvbG9naW5fYXBpIiwiaWF0IjoxNTE3MzkwNTkwLCJleHAiOjE1MTczOTQxOTAsIm5iZiI6MTUxNzM5MDU5MCwianRpIjoiWUxtdXJ5TkV2UzlwSEExTyJ9.nWV7OWLYdMJmZCHNP9tFuAmZ84DwzYO00O3jQ_RfhXQ” } What I required is to append that token with the apiUrl to get the appropriate information of a user currently logged in. The server is returning this JSON object in a variable “result” as shown below: // for login the user in the app. loginUser() { //values from the […]

How to use local(project folder) installed ionic version instead global

I am having older ionic version which installed globally using -g option. For the new project i have installed new ionic version without -g option. npm install [email protected] If i try to run any ionic commands, It was always using the globally installed ionic version. Is it possible to point locally installed version? Because, i do not want to update the ionic for the old project. Source: AngularJS

Next Page »