Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all 49526 articles
Browse latest View live

How to Display JSON Response

$
0
0

@soomit wrote:

Below is my JSON response getting from WordPress back-end
I and to print Child Name, DOB and Hobby please help me out.

id	60
date	"2017-11-30T05:57:15"
date_gmt	"2017-11-30T05:57:15"
guid
rendered	"http://mydomain.com/med/?post_type=doctor-list&p=60"
modified	"2017-11-30T08:57:07"
modified_gmt	"2017-11-30T08:57:07"
slug	"sourav-halder"
status	"publish"
type	"doctor-list"
link	"http://mydomain.com/med/doctor-list/sourav-halder/"
title
rendered	"Sourav Halder"
author	1
featured_media	0
menu_order	0
template	""
meta	[]
doctor-category	[]
_meta_doctor_address	"Kolkata"
_meta_doctor_mobile	"123456789"
_meta_doctor_email	"info@sourav.com"
_meta_doctor_dob	"11/27/1990"
_meta_doctor_anniversary	"11/29/2017"
_meta_wife_name	"Neha Halder"
_meta_wife_hobby	"Shopping"
_meta_wife_dob	"11/28/1992"
_meta_child_details
0:
child_name	"Mayank"
_meta_child_hobby	"Cricket"
child_dob	"10/23/2017"
1:
child_name	"Dev"
_meta_child_hobby	"Hockey"
child_dob	"11/20/2017"

Posts: 4

Participants: 2

Read full topic


Ionic File Transfer in Browser

Problem with Ionic website

AutoFocus on Input

$
0
0

@dardanaliu wrote:

Hi

I have problem with input to make autofocus!

If I make in HTML than the keyboard open and close
<ion-textarea type=“text” id=“codeAnswer” name=“answer” [(ngModel)]=“codeAnswer” autofo>

Any Idea how to make autofocus…

Posts: 1

Participants: 1

Read full topic

Deeplinking and tabs

$
0
0

@mahnuh wrote:

Hi,

I am playing around with deeplinking in a tabs based Ionic 3 app. As you can see in the following video the URL changes are working fine when switching tabs and I also can open an URL and the app will be loaded, the corresponding tab selected: http://sharedby.manuel-heidrich.com/85k9GB/5adv9PXF

What’s not working is navigating to another page within for example the contact tab and then refreshing the page, as you can see in the next video: http://sharedby.manuel-heidrich.com/H81KjG/3lOpECHf
When I refresh the page the app jumps to the home tab but with the contact page loaded.

So what I am trying to achieve is obviously the app to open AnotherPage within the contact tab when refreshing the page. The question is: am I doing something wrong or is there some other issue involved? Does anybody have a solution for this problem?

I created a repo containing my demo app: https://github.com/mahnuh/ionic-deeplinking-experiments

Posts: 1

Participants: 1

Read full topic

Project code does not fully push to ionic view

$
0
0

@iversa wrote:

We have a project that we are trying to push to Ionic View dashboard and it works using Git Push but from what we are finding out is that it does not push all directories. See the attached from Git Hub directory structure and as far as we know the src directory does not get pushed to ionic view project. For example, in the src directory, we have a providers directory that contains AWS services for the Cognito User Pool. When using the Ionic View App we get an error that the user pool is missing.
Why is that?

Posts: 1

Participants: 1

Read full topic

Include other page

Insert into and select from php

$
0
0

@valentinay wrote:

I am creating an app where i have 2 users admin and patient so each account has 2 users .
account_info(acc_id(pk, auto inc), p_username, a_username,password)
These will be entered on one page.
After that the user goes to enter the patient information. But i don’t want the user to enter p_username again. I want to insert them in the table and then he can insert the rest of the information.
patient_info ( p_username (pk), acc_id, p_fname,…)
The admin_info table has amost the same table as patient_info
The commin link is acc_id.
i have this:

 $sql  = "INSERT INTO patient_info(p_username, acc_id, p_fname, p_lname,
p_gender, p_condition,
p_birthdate, p_emergencycontact)
				SELECT p_username, acc_id
					FROM account_info
 VALUES(:p_fname, :p_lname, :p_gender, :p_condition, :p_birthdate,
:p_emergencycontact)";

Posts: 1

Participants: 1

Read full topic


Some jquery plugins doesn't work with ionic framework

$
0
0

@vpotluri wrote:

Hi,
I want to implement clock picker similar to http://weareoutman.github.io/clockpicker/. I’ve been looking very vigorously for almost week now, but had no success. So I thought of integrating jquery clock picker plugin by
npm install clockpicker --save.
I followed all instructions given in https://medium.com/@NetanelBasal/typescript-integrate-jquery-plugin-in-your-project-e28c6887d8dc and I was able to integrate bootstrap-daterangepicker. So tought same instuctions will work for jquery clockpicker, but doesn’t work.

I ran this steps

npm install jquery --save

npm install @types/jquery --save

npm install clockpicker --save

import * as $ from ‘jquery’;
import ‘clockpicker’; //similar to import ‘bootstrap-daterangepicker’;
@Directive({
selector: “[clockpicker]”
})
class DaterangepickerDirective {
constructor(private el: ElementRef) {}
ngOnInit() {
$(this.el.nativeElement).clockpicker();
}
}

and finally included
interface JQuery {
clockpicker(options?: any, callback?: Function) : any;
}
in new typings.d.ts file which I added to src folder

I’m getting cannot find module clockpicker but I can see clockpicker in node modules

As I said earlier same insturctions work for bootstrap-daterangepicker but not for clockpicker. What am I missing.
Please help

Posts: 3

Participants: 2

Read full topic

Back/Previous navigation browser not functioning on Tabs

$
0
0

@jjjhanrey wrote:

I implemented a tabs with side menu interface as seen on https://www.djamware.com/post/587d543080aca723c115beaf/how-to-mixing-side-menu-and-tabs-in-ionic-2. Things are working well as it was inteded from the tutorial except for an issue. Take this example:

  1. User is on Tab1.
    2, User decides to navigate to Tab2, clicks Tab2.
  2. User wants to navigate BACK to Tab1, clicks previous button on Chrome.
    Issue User is not able to navigate back when previous/back button is clicked, instead the url changes but the active Tab does not.

The repo I am working on is at https://github.com/jjjhanreyyy/Prosecutor-App

Posts: 1

Participants: 1

Read full topic

Best implementation for an encrypted database

$
0
0

@milesHopkins wrote:

Hi,
As part of the the specifications for an app, I need to create an encrypted database that ionic can interact with. I have been looking into Cordova-sqlcipher-adapter, which looks like it will work, but I am used to working with realm and other higher level frameworks rather than raw sql statements. Are there any alternatives to using sqlite?

Thanks

Posts: 1

Participants: 1

Read full topic

Can't navigate away from root page

$
0
0

@chrisklus wrote:

I am trying to navigate from my root page, LoginPage, to a page called RegisterPage. In login.html, there is a button that calls register() in the login.js file. I have set the entry components in the app module and the register module for the register page, but nothing happens when the register button is clicked. I am hoping I’m missing something simple but have had no luck. Any help would be appreciated.

login.html: https://github.com/chrisklus/foodfinder/blob/master/src/pages/login/login.html
login.ts: https://github.com/chrisklus/foodfinder/blob/master/src/pages/login/login.ts
app.module.ts: https://github.com/chrisklus/foodfinder/blob/master/src/app/app.module.ts
register.module.ts: https://github.com/chrisklus/foodfinder/blob/master/src/pages/register/register.module.ts

My ionic version is 3.19.0. My node version is 6.11.2. Working in Cloud9 with Ubuntu 14.04.

Posts: 1

Participants: 1

Read full topic

App not installing on both device and emulator

$
0
0

@sneceesay77 wrote:

My application was building and running on an emulator and a device. I got a new device today with Android 4.4.2 and as I debug the problem of file///*index.html not found I did couple of installation and now the app will not build. I am getting the error below

FAILURE: Build failed with an exception.

  • Where:
    Build file ‘/some_path/platforms/android/build.gradle’ line: 260

  • What went wrong:
    A problem occurred evaluating root project ‘android’.

Could not get unknown property ‘GOOGLE_PLAY_SERVICES_VERSION’ for object of type org.gradle.api.internal.artif
acts.dsl.dependencies.DefaultDependencyHandler.

In trying to solve this problem, I checked the generated .gradle file and found the two at line 259 and 260.

 compile "com.google.android.gms:play-services-location:+"
 compile "com.google.android.gms:play-services-location:$GOOGLE_PLAY_SERVICES_VERSION"

I have installed Google Play Service version 46 and all looks fine. The output of ionic info is attached below.

cli packages: (/some_path/learningIonic/Jollof/node_modules)

@ionic/cli-utils  : 1.18.0
ionic (Ionic CLI) : 3.18.0

global packages:

cordova (Cordova CLI) : 7.0.1

local packages:

@ionic/app-scripts : 2.0.2
Cordova Platforms  : android 6.2.3 ios 4.5.4
Ionic Framework    : ionic-angular 3.5.3

System:

Android SDK Tools : 26.1.1
Node              : v8.1.3
npm               : 5.0.3
OS                : Linux 4.4

Posts: 1

Participants: 1

Read full topic

Ion-item inside an ion-item?

$
0
0

@ericeslinger wrote:

I have a bunch of custom-render doodad components in my app. Like, “here’s how you render a community preview - member count, name, and so on”, so I can do <community-preview [community]="item"> or what have you.

The problem is that the preview uses an ion-item element for layout - makes it easy to have icons, text, and everything else render nicely, and I don’t have to deal with my own parallel flexbox stuff. Except sometimes community-preview is rendered itself inside an ion-item. I haven’t had any rendering problems to date, except now that I’m trying to fiddle with reorderable lists.

In particular, if I have that rough structure- an ion-list where each direct ion-item child has somewhere in its child hierarchy an ion-item, setting reorderable on the list ends up putting two grab handles on each item - one on the outside item, and one on the nested item. Worse: the nested handle doesn’t actually work (getReorderNode doesn’t look far enough up the dom tree to find its reordering parent node).

So, a two-phase question: one, is it possible to set an attribute on an ion-item to override the containing list’s claim of reorderability? and two, are there likely other issues associated with nesting ion-items inside each other for layout purposes, and if so: what’s the general strategy? I’ll note that I landed on ion-item mainly because there doesn’t seem to be a basic ion-panel that attaches default text / icon / flexbox styling the way items do, so I sometimes end up using ion-item outside of its intended semantic meaning.

Posts: 1

Participants: 1

Read full topic

How to have two functions for one button (Typescript)

$
0
0

@jamesharvey wrote:

Hello guys,

How can I implement two functions for one button?

For instance, I would like to turn on something when I tab on button and then turn off something when I tab on it again.
Right now I have tutorials regarding implementing only one function to a button.

Any advice on this with a simple typescript example?

Please help me out

Thanks,

Posts: 1

Participants: 1

Read full topic


NgFor not working | Json | NgFor inside NgFor

$
0
0

@Nissius wrote:

Hi, I have a problem …

My variable is stated like this:

 resultado = {
    conta: {},
    planos_disponiveis: new Array<any>()
  };

Searching for json:

ionViewDidLoad() {
    let eu = this;
    this.MercadoLivreProvider.get('plano','86851104').then(retorno => {
      const dados = (retorno as any);
      const objeto_retorno = JSON.parse(dados._body);
      eu.resultado = objeto_retorno;
      console.log(JSON.stringify(eu.resultado.planos_disponiveis, null, 4));
    });
  }

I get a json formatted as follows:

[ { "nome": "carlos" }, { "nome": "joao" } ]

My HTML looks like this:

<ion-card *ngFor="let plano of resultado.planos_disponiveis">
      <ion-card-header class="usuario">
        <ion-icon name="md-person"></ion-icon>
      </ion-card-header>
      <ion-list *ngFor="let info of plano">
        <p><b>{{info.nome}}</b> é seu plano atual que vai vencer dia xx/xx/2020.</p>
      </ion-list>
</ion-card>

Why the mistake ??

Any examples to help me?

Posts: 1

Participants: 1

Read full topic

I’m trying to use a custom made CSS3 animation on an HTML page

$
0
0

@jamesharvey wrote:

I’m trying to use a custom made CSS3 animation on an HTML page.

I removed the stock splashscreen and now it’s gone but gray screen extended one more second, making it total three seconds gray blank screen when my app starts.
I tested an Apache Cordova app with splash screen and it has the same gray screen which lasts for three seconds. It looks like all apps built on cordova has this problem regardless of splash screen plugin being installed & used or not.

How can I remove this gray blank screen?

Maybe is this because my HTC phone is from end of 2015? soon I will be obtaining five other more recent android devices to test. Other java & c# apps don’t show this screen on my HTC device.

Posts: 5

Participants: 2

Read full topic

DIsplay / Copy huge amount of text

$
0
0

@jason314 wrote:

My app maintains an internal log (IndexDB). I want to build a mechanism for displaying over 8000 records (at least 1MB) of data, then allow he user to export the text. I’m assuming by selecting the copy/pasting the text from the UI into another app. A virtual list can certainly display the data. But I’m not sure how to provide a mechanism for copying the data or otherwise exporting it. I assume a text area has a max capacity. Any thoughts on that. What about a Card. Limits on that? What else.

Has anyone done this and could provide a viable recipe.
Thanks

Jason

Posts: 1

Participants: 1

Read full topic

Split pane with 3 navs

$
0
0

@TylerTW wrote:

Can anyone provide an example or explain how to use split pane to have a menu on the left, a main nav in the center and another nav on the right.

Thanks

Posts: 1

Participants: 1

Read full topic

Checking Network Connectivity in ionic

$
0
0

@sam1408 wrote:

Hi guys I am building a internet related application, and in that application I want to be able to check for connectivity status.
What I’m trying to implement is when a user opens up my app… In the main page the app should check if internet connectivity is available… if available then app will work like its supposed to…but if network connectivity is not present, then the user should be able to see a toast message or an alert to notify him, there is no internet connection

I tried the cordova native network plugin but for some reason I’m not able to install it :

I dont have any preference towards plugins or some other methods… I just want to implement the above function in the app. Please help.

Posts: 1

Participants: 1

Read full topic

Viewing all 49526 articles
Browse latest View live