ionic-framework

Can I make an Ajax JQuery POST request with Ionic?

 ̄綄美尐妖づ 提交于 2019-12-25 01:45:44
问题 I want to make an NTLM authentication from a Ionic app. Using postman (a tool to test requests), I was able to make this authentication, and it works perfectly (using NTLM Authentication option). However, postman does not provide any code to implement this request in Angular (For Ionic). After making my own research, I found out that Angular 2 and above does not support NTLM authentication. Is that really the case? So I was thinkig about generating my request with Jquery and the code below

Ionic 3 show loading symbol on http request

馋奶兔 提交于 2019-12-25 01:45:07
问题 I am learning Ionic,so once the Signup button is clicked, How to show loading symbol and hide it after getting the reponse in ionic 3 ? sign.html <button ion-button color="danger" block outline (click)="signup()">Signup</button> signup.ts signup() { this.authServiceProvider.postData(this.userData, "signup").then((result) => { this.responseData = result; console.log(this.responseData); if( (JSON.stringify(this.responseData._body)) != "" ) { this.navCtrl.setRoot(HomePage); } else { console.log(

Ionic component in app.component.ts and pages

可紊 提交于 2019-12-25 01:44:53
问题 im struggeling with a custom component in ionic. I have a menu in app.html and I use lazy-loading for the pages. I try to implement the component into the menu in app.html and into some pages. But I can only implement it into app.html or pages, not in both. When I include the component only in app.module.ts the component works in app.html but if I include the component in my page template I get the following error: Uncaught (in promise): Error: Template parse errors: 'fa-icon' is not a known

How to redirect the user from the route defined with Id when the user is not login In Ionic 4

蓝咒 提交于 2019-12-25 01:36:14
问题 I am working in my Ionic 4 app and I am working in my login/register system. I have defined the route with the id and when the user is not login and try to visit that route, it will redirect to login page and when the user is login then he can visit that route but the problem is that when the user is trying to visit that route with the id, it is showing the error. This is my tabs.router.module.ts : import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router

Module not found: Error: Can't resolve './app.module.ngfactory' - ionic 3, angular 5

混江龙づ霸主 提交于 2019-12-25 01:34:53
问题 After I installed ngx-translate module into the ionic app and implemented translations all over the custom pages I can't build my app anymore. When I run $ ionic cordova build browser --prod I get the following exception: Running app-scripts build: --prod --platform browser --target cordova [15:30:02] build prod started ... [15:30:02] clean started ... [15:30:02] clean finished in 3 ms [15:30:02] copy started ... [15:30:03] deeplinks started ... [15:30:03] deeplinks finished in 207 ms [15:30

cordova-plugin-inappbrowser not opening links from APP to IOS Device default Browser

限于喜欢 提交于 2019-12-25 01:05:01
问题 Search a lot, but not able to find the correct solution. I am trying to open links from my app to default browser of my IOS device, but its not working. Its perfectly working with my android device. My plugin is installed properly, ( i can see that in cordova plugin list on my app) followed are the syntaxes, which i have tried: window.open(this.href, '_system'); window.open(this.href, '_blank', {closebuttoncaption: 'Close', toolbar: 'yes', 'location=yes'}); window.open(this.href, '_blank',

How to convert new Date() into JSON string?

拜拜、爱过 提交于 2019-12-25 00:50:02
问题 I'm currently working on an ionic app and I'm using the Ionic Native Calendar Plugin to create calendar events in my project. I want to be able to change the dates and times dynamically for each event so I'm using Firebase as the backend and would like to integrate the calendar parameters into my JSON file to achieve this. Everything is working well following the standard method, which is, having a button with a function: **home.html** <button ion-button (click)="createEvent()">Add to

Deeplinking - Opening an Ionic App through another Ionic App

北城以北 提交于 2019-12-25 00:49:42
问题 I'm trying to develope two Ionic applications which are apple to communicate at least in one direction. How do I enable one application to directly open the other one? I have red many things about Deep-Linking but I'm not sure if this is the right way as I only want to open one app (and maybe passing data) through the calling of a function within the other app. Does anyone have experience with this scenario? I'm happy for every answer! 回答1: You can use the Custom-URL-scheme plugin Install it

Authorization header not working for angular 2

浪尽此生 提交于 2019-12-25 00:43:03
问题 Hello I am using the Ionic 2 framework with Angular and I want to make a http request with the authorization header but it appears it is not sending the header. What have I done wrong? @Injectable() export class UserServiceProvider { private loginSuccess: any; constructor(public http: Http) { console.log('Hello UserServiceProvider Provider'); } login(username, password) { var token = btoa(username + ':' + password); alert(token); this.loginSuccess = false; let headers = new Headers(); headers

ion-list display asynchronously added data to array

烂漫一生 提交于 2019-12-25 00:38:12
问题 I am new in ionic. I trying to make an app which will search for Bluetooth devices and will display them. I have created a service which search for Bluetooth devices. When a device found an event publishes like below: this.event.publish("ibeacon", newBeacon); Here is my event injection: import { Events } from 'ionic-angular/util/events'; ...... constructor(private event: Events){} Here is how I subscribe to the event in order to get the published data: this.event.subscribe("ibeacon",