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

How do I can get a user click a button once?

$
0
0

@mrg250 wrote:

Hey, I’m trying to make a feature where the user can ‘like’/‘upvote’ something (a post) only once, the procedure is :
is clicked ‘true’?
if no user clicks the button
clicked = true

the problem that I have, is that ‘clicked’ resets (after exiting the post [modal]) and doesn’t hold his value.
How do I overcome this? Do you have any efficient ideas that can replace this?
I’m using firebase btw .

Posts: 2

Participants: 2

Read full topic


Ionic 4 Bugs LoadingController, AlertController, ToastController

$
0
0

@lucascardoso wrote:

Hello guys!

I’m having trouble using the LoadingController, ToastController and AlerControler on Ionic 4

import { Platform, NavController, NavParams, AlertController,
  LoadingController, ToastController } from '@ionic/angular';

@Injectable({
     providedIn: 'root'
})
export class BaseService {

constructor(public loadingCtrl: LoadingController, public alertCntrl: AlertController,
    public toast: ToastController, public platform: Platform) {

  }

Ionic info

Could anyone help me with this issue?
Thanks in advance!

Posts: 4

Participants: 2

Read full topic

Ionic 4 Page Transition Browser

Wordpress gallery in Ionic 3

$
0
0

@Mayanktaker wrote:

Hello all,
I am creating an app with Wordpress backend. And I am stuck with the gallery. I have a plugin install in WP. That plugin creates a page for each user and only that user can access it and in that page I am uploading a gallery for that user. And I am creating an app for this. So users can view their pictures in app after they login. This is a photo studio firm app.

And I dont know how to show gallery with rest api to ionic app after user login.

Please help me. I searched everywhere, docs, forums, etc but cant find a way or solution.
:frowning:

Posts: 1

Participants: 1

Read full topic

Ion-icon is not working after upgrading to ionic 4 r.c 2

$
0
0

@shafiul2344 wrote:

“ion-icon” is not working after upgrading to ionic 4 r.c 2.
Previously it was working.

Ionic:

ionic (Ionic CLI) : 4.7.1 (C:\Users\shafi\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.0.0-rc.2
@angular-devkit/build-angular : 0.11.4
@angular-devkit/schematics : 0.8.7
@angular/cli : 7.1.4
@ionic/angular-toolkit : 1.1.0

Cordova:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.2
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.1, (and 8 other plugins)

System:

Android SDK Tools : 26.1.1 (C:\Users\shafi\AppData\Local\Android\Sdk)
NodeJS : v10.15.0 (C:\Program Files\nodejs\node.exe)
npm : 6.4.1
OS : Windows 10

Posts: 1

Participants: 1

Read full topic

Close all modals?

$
0
0

@helpmelearn wrote:

For our app because it has sensitive information, after 30 mins of not being used we log the user out and push them to the login screen. This works fine except if the user has a modal page open. The background page does log out and go to the login page, but the modal is over the top.
Is there any way to just close down all modals that are open? I know this is a long shot.

Posts: 1

Participants: 1

Read full topic

Build failed. MinSdkVersion Bug

$
0
0

@Lastfreeusername wrote:

I can’t build the App because MinSdkVersion Bug. Why Bug? Because I do not have the wrong Min SDK Version set. I also re-installed the Android platform, modules and updated all npm package.

:app:processDebugManifest FAILED
23 actionable tasks: 4 executed, 19 up-to-date
  uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:CordovaLib] 
  <path>\platforms\android\CordovaLib\build\intermediates\manifests\full\debug\AndroidManifest.xml 
  as the library might be using APIs not available in 16
  Suggestion: use a compatible library with a minSdk of at most 16,
    or increase this project's minSdk version to at least 19,
    or use tools:overrideLibrary="org.apache.cordova" to force usage (may lead to runtime failures)

I set level 23 (Android 6)
<preference name="android-minSdkVersion" value="23" />

I have no idea what’s wrong -.- Zzzz I’m sooo tired. :crazy_face:

Posts: 1

Participants: 1

Read full topic

Ionic-image-loader(v4) always download!

$
0
0

@akila321 wrote:

Hello community,

I’m using ionic-image-loader v4 branch for my ionic 4 project. Everything works fine except images always download from internet. But I can see app cache increases. I’m using firebase storage.

Please let me know if you have any idea.

Thanks.

Posts: 1

Participants: 1

Read full topic


Any changes made to code not reflecting in build apk

$
0
0

@sanjayparate wrote:

Any changes made to code not reflecting in build apk even though I removed and then add platform.
Changes made in version of config.xml
But didn’t reflecting.

Posts: 2

Participants: 2

Read full topic

Debit card/prepaid card scanning

$
0
0

@yadavsudhir wrote:

I am creating a payment app where i need to scan debit card feature for which i am not finding any solution that how accomplish it.

Using Card IO plugin to scan credit card.

Thank You.

Posts: 1

Participants: 1

Read full topic

Help want to stored map.leaflet point

$
0
0

@faipagun wrote:

Help me
I want to save leaflet coordinates.

The input component gets a value, from the confirmation button it has been selected. But when stored the value (coordinates) does not exist.

What is the right way, help me, this makes me want to scream …


.html file
 <ion-item>
                <ion-label></ion-label>
                <ion-input type="text" text-right placeholder="Keterangan tambahan alamat" id="c" [(ngModel)]="postcode"></ion-input>
            </ion-item>
 <div class="btn-fisx-bottom">
            <button ion-button full class="bg-thime btn-round btn-text" (click)="saveAddress()">Simpan Alamat</button>
        </div>

/////////////////////////////////////////////////////////////////
.ts file
loadmap() {
var tileLayer = new leaflet.TileLayer(‘http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png’,{
attribution: '© OpenStreetMap
});

var map = new leaflet.Map(‘map’, {‘zoom’: 16,
‘layers’: [tileLayer]
})
var marker = null;
map.locate({setView: true,
maxZoom: 18
}).on(‘click’, function (e) {

if (marker !== null) {
map.removeLayer(marker);
}
marker = leaflet.marker(e.latlng).addTo(map);
////////////////////////////////////////
var old = console.log;
var logger = (document.getElementById(‘c’));
console.log = function (message) {
if (typeof message == ‘object’) {
logger.innerHTML = “”;
logger.innerHTML += (JSON && JSON.stringify ? JSON.stringify(message) : String(message)) + ‘
’;
} else {
logger.innerHTML = “”;
logger.innerHTML += (JSON && JSON.stringify ? JSON.stringify(message) : String(message)) + ‘
’;
}
}
console.log(e.latlng);

/////////////////////////////////////////
});
}

**saveAddress()** {
				var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
		if (this.phone.length == 0) {
			this.showToast('Belum masukkan nomor telepon');
		} else if (this.address_2.length == 0) {
			this.showToast('Belum masukkan keterangan tambahan alamat');
		} else if (this.postcode.length == 0) {
			this.showToast('Enter postcode');
		} else {
			...
			} else {
				...
					}
				}
				..
				}
			}
			...
		}
	}

///////////////////////////////////////////////////////////////////////////////////////////////

**TypeError: Cannot read property 'length' of undefined**
    at AddressPage.webpackJsonp.121.saveAddress 
(http://localhost:8101/build/main.js:547:40)
    at Object.eval [as handleEvent] (ng:///AppModule/AddressPage.ngfactory.js:279:27)
    at handleEvent (http://localhost:8101/build/vendor.js:13559:172)
    at callWithDebugContext (http://localhost:8101/build/vendor.js:15044:42)
    at Object.debugHandleEvent [as handleEvent] (http://localhost:8101/build/vendor.js:14631:12)
    at dispatchEvent (http://localhost:8101/build/vendor.js:10008:25)
    at http://localhost:8101/build/vendor.js:10622:38
    at HTMLButtonElement.<anonymous> (http://localhost:8101/build/vendor.js:36779:53)
    at t.invokeTask (http://localhost:8101/build/polyfills.js:3:15660)
    at Object.onInvokeTask (http://localhost:8101/build/vendor.js:4924:33)
```

Posts: 1

Participants: 1

Read full topic

How to integrate Epson Android Sdk in Ionic for Bluetooth printing

$
0
0

@hirenkorat3 wrote:

i implemented epson javascript sdk in ionic web successfully.
can i use javascript sdk in android build ?
if no then how can i implement epson android sdk in ionic for bluetooth and network printing.

Posts: 1

Participants: 1

Read full topic

Show keyboard (Mobile Android) without user action

$
0
0

@JoseGonzaga wrote:

Hi! According to the Cordova documentation the “KeyboardDisplayRequiresUserAction” property only caters to IOS, is there any similar property to control the keyboard in Android for when an input receives the focus?

Posts: 1

Participants: 1

Read full topic

Remove the edges of an input in ionic 4

$
0
0

@MoreFlores wrote:

I am currently developing an app on ionic v4 and my problems is that I can not remove the edges of the focus, previously in ionic v3 only these lines of code are placed in variable.css and ready but in this version it does not work, thanks
With sass

  $text-input-md-highlight-color-invalid: transparent;
  $text-input-md-highlight-color-valid: transparent;
  $text-input-md-show-invalid-highlight: transparent;
  $text-input-md-highlight-color: transparent;
  $text-input-md-show-valid-highlight: transparent;
  $text-input-md-show-focus-highlight: transparent;
  $text-input-md-show-valid-highlight: $text-input-md-show-focus-highlight transparent;
  $text-input-md-show-invalid-highlight: $text-input-md-show-focus-highlight transparent;

bordes

Posts: 1

Participants: 1

Read full topic

PWA and native app

$
0
0

@Rasioc wrote:

I currently have the requirement for a new app which shall work as website but also have a mobile android and iOS app.
I thought this could be a perfect use case for Ionic using PWA for website and building the apps, but after some research I somehow have doubts that this will work well with the same codebase.
I don’t need much native functionalities on the mobiles, the only thing would be PUSH notifications.

Could you tell me please if this is an expected use case to go for both - native AND pwa in one codebase?

And if yes:
I need some tracking in the app so I wanted to include Firebase analytics as I have experience in another ionic app with that, but how can I do this then on the website part? Does anybody know how this is usually solved?

Posts: 4

Participants: 2

Read full topic


Center a vertically ionic ion-content v4

$
0
0

@MoreFlores wrote:

Hello everyone, someone knows how I can put it in the middle of the screen and see it in the middle of the screen in all the mobile devices the margin-top is to be downloaded using px or% but in screens it looks different

my html:

<ion-content color="favorite" padding>
  <div class="div_general">
    <img src="assets/imgs/logo.png" width="55%">
    <div class="div_mayor">
      <ion-list no-lines>
        <ion-item>
          <ion-label><ion-icon name="person"></ion-icon></ion-label>
          <ion-input type="text"></ion-input>
        </ion-item>
        <ion-item>
            <ion-label><ion-icon name="key"></ion-icon></ion-label>
          <ion-input type="password"></ion-input>
        </ion-item>
        <ion-button color="favorite" class="button" expand="block">
          INGRESAR
        </ion-button>
      </ion-list>
    </div>
  </div>
</ion-content>

my css:

ion-content {
    width: 100% auto !important;
}
img{
    display:block;
    margin:auto;
    }

.div_mayor{
    margin-bottom: 20px;
    width:auto;
    margin:auto;
    height: 200px auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    ion-button {
        height: 45px;
        margin-top: 10px !important;
    }
    ion-item{
        padding: 3px;
        margin-top: 10px !important;        
        border-radius: 10px;
        border-style: solid;
        border-color: #3f51b5;        
    }  
}


Posts: 2

Participants: 2

Read full topic

PWA Rewarded video

$
0
0

@Rasioc wrote:

Does anybody have experience in advertising a PWA?

Especially regarding

  • Intersitial ads
  • banners
  • rewarded videos

As this is no native app we can’t use admob - from what I found it seems like AdSense is not yet compatible with PWAs. Does anbody know some ad provider(s) which are compatible to PWAs and offer above types of ads?

Posts: 1

Participants: 1

Read full topic

Ionic v4, capacitor, pwa

$
0
0

@Rasioc wrote:

I want to start a new project and would like to

  1. Use Ionic v4 beta
  2. Capacitor
  3. PWA first
    (4. Later: mobile support)

I am a bit lost in documentation as of how to start this setup.

What I did now:

  1. Create Ionic project v4:
  • ionic start Appname blank
  • Say yes to use v4
  1. Add capacitor:
  • npm install --save @capacitor/core @capacitor/cli
  • npx cap init
  • npm run build
  1. Add ng PWA as found in some ionic doc (https://beta.ionicframework.com/docs/publishing/progressive-web-app/)
  • ng add @angular/pwa
  • ionic build --prod

Was that right? Trying to use “ionic serve” it doesn’t seem to work. According chromes dev tools no service worker is found.
edit: OK i found the missing piece in https://angular.io/guide/service-worker-getting-started, which mentiones ng serves does not work with service workers and suggests a different http server to be used.

I just found another doc regarding ionic PWA toolkit (https://ionicframework.com/pwa/toolkit) which tells a different way starting the whole project directly with this toolkit, which seems to have some prepared stuff?
Is there any advantage to one or the other way?

Additional question:
When I need some custom code in a service worker - where to add it? the service workers are generated directly in /www/ dir which will be overriden by next build, right?

Posts: 1

Participants: 1

Read full topic

Building web application

$
0
0

@ahmadt wrote:

Hello everyone,

I’m new with Ionic and I want your opinion, I want to build a web application that will target desktop users (90% of users will use their desktop browser), would you recommend me to do that?

My initial thought is to build this web application with jquery + bootstrap but I thought maybe this is a good opportunity for me to learn ionic.

I’m mainly concerned about the UI experience for the users, how are the pages gonna be presented for them.

Appreciate if you can direct me to a web app that is designed for desktop users

Posts: 1

Participants: 1

Read full topic

ScrollToTop in Ionic 4

$
0
0

@shepard wrote:

How do you use scrollToTop in Ionic 4 now as importing ‘content’ is no longer there?

import {Content} from "@ionic/angular";

@ionic/angular/dist/core"’ has no exported member ‘Content’.

Ionic Framework : @ionic/angular 4.0.0-rc.2

Posts: 3

Participants: 2

Read full topic

Viewing all 48980 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>