@Qabrix wrote:
Hi!
I am pretty new to ionic and I was wondering how to change the background of the specific page.Thanks for help!
Posts: 1
Participants: 1
@Qabrix wrote:
Hi!
I am pretty new to ionic and I was wondering how to change the background of the specific page.Thanks for help!
Posts: 1
Participants: 1
@Quiesan wrote:
Hi !
I have an ion-avatar and I fixed the size of the img at width: 12rem !important and same for the height but the result is not really a circle, do you know how Can i solve this problem please ?
Posts: 1
Participants: 1
@Qabrix wrote:
Hi,
so I gotta this code:_html:_ <ion-navbar hideBackButton > <ion-title>Log</ion-title> <div class = "reg"> <button ion-button (click)="register()">Register</button> </div> </ion-navbar> _css:_ .reg{ text-align: right; }
and button and the title arent in the same line.
How to change it?
Posts: 1
Participants: 1
@lsantaniello wrote:
Hi guys,
I integrated the AWS.S3 service into my Ionic App but I have a problem with getting a video from my Gallery.
I used this code in order to retrieve a video:this.camera.getPicture(this.cameraOptions).then((imageData) => { console.log("FILE IMAGE DATA: ", imageData); ... }, (err) => { console("ERROR -> " + JSON.stringify(err)); });
imageData is a uri path of my video file, for example ‘/storage/…/myVideo.mp4’
In order to send the file to AWS.S3 I think that I need to convert it into Base64String.
How can I do it?
Could you please help me?
Thanks
Posts: 2
Participants: 2
@nahuelreymundo wrote:
Hi i have a form into my ionic App, i have 2 input:type= text. And a button.I need to press the button, save the data and take it to another page, this page will appear as a list
Image show the button add +, this button redirect to the form, and when the form data it’s save,This has to return to the page with the button +
![fab|281x500]
(upload://tT68oguOmIe7JP6i9nLPDxK00Nv.png)
Posts: 2
Participants: 2
@lucascrandle wrote:
Hello Forum,
I was wondering if people could share the way that they have setup duration inputs for users. Possible use cases as: reminders in 1 hour and 20 minutes from now, or log amount of time spent on an item.
I ask because the DateTimePicker in ionic only supports time input, so you could never intput 0 hours, 30 minutes. It feels like this was not meant for duration inputs.
Thanks
Posts: 1
Participants: 1
@Quiesan wrote:
hi !
I create my own icon but I can’t resize them in my application with font-size… Is it possible please ?
Posts: 1
Participants: 1
@adityajaiz wrote:
Morning it was working fine, but When I made a build it downloaded some items and thrown this error. Is this because of Android P Update in market?
INFO @ionic/cli-utils : 1.19.1 ionic (Ionic CLI) : 3.19.1 global packages: cordova (Cordova CLI) : 7.1.0 local packages: @ionic/app-scripts : 2.1.3 Cordova Platforms : android 6.3.0 Ionic Framework : ionic-angular 3.6.0 System: Android SDK Tools : 26.0.2 Node : v7.8.0 npm : 4.2.0 OS : Windows 10 Environment Variables: ANDROID_HOME : C:\Users\dell2\AppData\Local\Android\sdk Misc: backend : legacy
Posts: 1
Participants: 1
@shadowloud wrote:
Hello,
I’m trying to import an external json feed and save it into ionic native storage so it is readable offline.
My TS file look like this…
export class HomePage { list: any; listlocal: any; constructor(private sqlitePorter: SQLitePorter, private sqlite: SQLite, private storage: Storage, private iab: InAppBrowser, public navCtrl: NavController, private auth: AuthProvider, public navParams: NavParams) { this.fetch(); } [...] // this.auth.MaCampagne is calling an external HTTP provider. // MaCampagne (campagne_id, userid) { // return this.http.get('http://url.com/json.php?id='+ campagne_id +'&user=' + userid).map(res => res.json()); // } fetch() { this.auth.MaCampagne(this.navParams.get('campagne_id'), this.navParams.get('userid')).subscribe( result => { this.list=result.data.inserts; //Fetching the json, iteration is working here. Defined as array. for(var i in this.list) { this.listlocal=this.storage.set('list', result.data.inserts); //Storing the json into storage. iteration no longer working. Defined as object. } }, err =>{ console.dir(err); }, ); }
Within my HTML file, my list header is like…
<div *ngFor="let item of listlocal; let i = index;">
If I replace “listlocal” (offline list) with my “list” (online list) it is working perfectly. However, if I use the values I stored, it says i can only use ngFor on arrays. I went on Google about it, most solutions I found said to use “keys” pipe, but I did not manage to make any of them work.
Cannot find a differ supporting object '[object Promise]' of type 'object'. NgFor only supports binding to Iterables such as Arrays.
I’ve been struggling with that for long now. I don’t get why my online list is considered an array and the other one is an object. I need to convert it into an array. How can I accomplish that?
Posts: 3
Participants: 3
@Qabrix wrote:
Hi!
Can I import stuff to ionic page from angular, such as for example:
import { moveIn } from ‘…/router.animations’;Is that possible?
Posts: 1
Participants: 1
@marilyn wrote:
Hello,
I will need help I have a error “Property” … ‘does not exist on type’ TheMovieDbApiConfigImage [] '
"I created a post on stackoverflow here it is -> https://stackoverflow.com/questions/49014840/ionic-3-property-does-not-exist-on-type-themoviedbapiconfigimage.can you help me. Thank you
Posts: 1
Participants: 1
@bwhiting wrote:
I’ve been creating my pages with the ionic CLI where it creates a page module for each page. But the tutorials I’ve been following just have me adding the pages directly to the app module and as variables when I push them onto the nav controller.
When I try and run ionic build prod it complains that I have the page declared in more than one module. Also, I would like to set up lazy loading for some pages. Can someone point me to a tutorial or an example that shows the proper use here?
Posts: 2
Participants: 2
@Qabrix wrote:
Hi,
So I ve just created new page with authentication (with firebase) and I am wondering how to add alerts to Login page so for example there won’t be errors like “Wrong email format”, or if the email won’t be corrent, the alerts would popout.My code in ts:
async login(user: User){ const result = this.aFAuth.auth.signInWithEmailAndPassword(user.email, user.password); this.navCtrl.setRoot(MainPage); }
Thanks for helping!
Posts: 1
Participants: 1
@lado wrote:
Hello, I’m trying to use Push Notifications with Firebase Cloud Messaging and Cordova FCM. My google-services.json located in root folder with config.xml and same file in platforms/android/ folder. With ionic cordova build I got error:
A problem occurred configuring root project ‘android’.
Cannot add task ‘:processDebugGoogleServices’ as a task with that name already exists.
I’ve installs:
cordova plugin add cordova-support-google-services --save
ionic cordova plugin add cordova-plugin-fcm
npm install --save @ionic-native/fcmand previously by another reason:
cordova plugin add cordova-plugin-googleplus …
Now what I got:
platforms/android/cordova-plugin-fcm/myapp-FCMPlugin.gradle:
buildscript { repositories { jcenter() mavenLocal() } dependencies { classpath 'com.android.tools.build:gradle:+' classpath 'com.google.gms:google-services:3.0.0' } } // apply plugin: 'com.google.gms.google-services' // class must be used instead of id(string) to be able to apply plugin from non-root gradle file apply plugin: com.google.gms.googleservices.GoogleServicesPlugin
platforms/android/cordova-support-google-services/myapp-build.gradle:
buildscript { repositories { jcenter() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:+' classpath 'com.google.gms:google-services:3.2.0' } } // apply plugin: 'com.google.gms.google-services' // class must be used instead of id(string) to be able to apply plugin from non-root gradle file ext.postBuildExtras = { apply plugin: com.google.gms.googleservices.GoogleServicesPlugin }
platforms/android/project.properties:
target=android-26 android.library.reference.1=CordovaLib cordova.system.library.1=com.google.android.gms:play-services-auth:11.0.1 cordova.system.library.2=com.google.android.gms:play-services-identity:11.0.1 cordova.system.library.3=com.facebook.android:facebook-android-sdk:4.14.+ cordova.system.library.4=com.google.firebase:firebase-core:+ cordova.system.library.5=com.google.firebase:firebase-messaging:11.0.1 cordova.gradle.include.1=cordova-plugin-fcm/hazarot-FCMPlugin.gradle cordova.gradle.include.2=cordova-support-google-services/hazarot-build.gradle
which is edited from:
target=android-26 android.library.reference.1=CordovaLib cordova.system.library.1=com.google.android.gms:play-services-auth:+ cordova.system.library.2=com.google.android.gms:play-services-identity:+ cordova.system.library.3=com.facebook.android:facebook-android-sdk:4.14.+ cordova.system.library.4=com.google.firebase:firebase-core:+ cordova.system.library.5=com.google.firebase:firebase-messaging:+ cordova.gradle.include.1=cordova-plugin-fcm/hazarot-FCMPlugin.gradle
platforms/android/build.gradle which is also edited as project.properties:
dependencies { compile fileTree(dir: 'libs', include: '*.jar') // SUB-PROJECT DEPENDENCIES START debugCompile(project(path: "CordovaLib", configuration: "debug")) releaseCompile(project(path: "CordovaLib", configuration: "release")) compile "com.google.android.gms:play-services-auth:11.0.1" compile "com.google.android.gms:play-services-identity:11.0.1" compile "com.facebook.android:facebook-android-sdk:4.14.+" compile "com.google.firebase:firebase-core:+" compile "com.google.firebase:firebase-messaging:11.0.1" // SUB-PROJECT DEPENDENCIES END }
plugins/cordova-plugin-fcm/scr/android/FCMPlugin.gradle:
buildscript { repositories { jcenter() mavenLocal() } dependencies { classpath 'com.android.tools.build:gradle:+' classpath 'com.google.gms:google-services:3.0.0' } } // apply plugin: 'com.google.gms.google-services' // class must be used instead of id(string) to be able to apply plugin from non-root gradle file apply plugin: com.google.gms.googleservices.GoogleServicesPlugin
plugins/cordova-support-google-services/build.gradle:
buildscript { repositories { jcenter() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:+' classpath 'com.google.gms:google-services:3.2.0' } } // apply plugin: 'com.google.gms.google-services' // class must be used instead of id(string) to be able to apply plugin from non-root gradle file ext.postBuildExtras = { apply plugin: com.google.gms.googleservices.GoogleServicesPlugin }
Not sure what is wrong, advice would be helpful
Posts: 1
Participants: 1
@typane wrote:
Hi all I am having some trouble deploying my app to firebase and calling out to googles api’s getting an odd parsing issue where the index.html file is being parsed back, I assume the proxy is resolving in some odd manner, this does work in dev just not in prod.
Here are the steps I have followed:
Proxy set to the following in ionic.config.json
"proxies": [{ "path": "/api", "proxyUrl": "https://maps.googleapis.com" }]
calls done from providers as follows:
/api/maps/api/place/nearbysearch/
Have also tried setting headers to
httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) }; import { HttpClient } from '@angular/common/http'; readonly PLACES_PREFIX = "/api/maps/api/place/nearbysearch/"; public getPlaces(lat: number, lng: number, radius: number, unitType: string, searchType: string) { let search = this.PLACES_PREFIX + "json?location=" + lat + ","+ lng + "&type=" + searchType + "&radius=" + radius + "&units=" + unitType + "&key=" + this.API_KEY; return this.http.get(search); } this.nearbyLocationsProvider.getPlaces(this.lat, this.lng, this.selectedTravelType.distance, "metric", this.selectedSearchType.googleSearchTerm).subscribe((res: any) => { console.log(res); }
This works in dev when posting to firebase I get:
SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse (<anonymous>) ...etc
with the error text being:
"<!DOCTYPE html> <html lang="en" dir="ltr"> <head> <script data-ionic="inject"> (function(w){var i=w.Ionic=w.Ionic||{};i.version='3.9.2';i.angular='5.0.3';i.staticDir='build/';})(window); </script>
This is the contents of my index.html. I have tried a lot of alternatives to get this working and I feel it has to do with redirection to index.html not allowing the query to leave however a bit lost from here.
Edit:
This works with the auto complete library and AGM however not when utilising http.get only in prod.Thanks for any help in advance
Posts: 1
Participants: 1
@gceduvieira wrote:
I do not know why but he is not saving the image she breaks
use function
this.file.writeFile(this.file.externalRootDirectory.concat(’/Download’),‘conprovante.jpeg’, canvasBlob);
Posts: 1
Participants: 1
@jicee13 wrote:
So I understand how to define custom colors in the /theme/variables.scss file, but what if instead of defining a custom color with a hex value I want to define it with an image? How could I do that?
Posts: 1
Participants: 1
@Perinban wrote:
Hi Im trying to create an app, for that I need to identify the Wi-Fi in the surroundings with its signal strengths. Is there anything I could make use of to create it? I have heard about WiFiWizard and Cordova plugin hotspot, Is there any option available in that which i can make use of ?
Posts: 1
Participants: 1
@photojo wrote:
Hi,
I’ve just began to work with ionic. I was successfull to use function from a provider in other pages. But now, I have some functions declared in a components. Is it possible to access these functions in others pages too?Tks
Jo
Posts: 1
Participants: 1
@flycoders_sourav wrote:
I’m try to download file form the external url below my code but its dose not working
Please helpme anyone.download(){ let targetPath = this.file.documentsDirectory; alert("hello") this.file.createDir(targetPath,'video',true) .then((res) => console.log('createDir video res',res)) .catch((err) => console.log('createDir video err',err)); const fileTransfer: FileTransferObject = this.transfer.create(); const url = "http://codersthought.com/sourav/videostatus/wp-content/uploads/2014/12/SampleVideo_1280x720_1mb.mp4"; var URL = encodeURI(url); fileTransfer.download(URL, this.file.externalRootDirectory +'video/'+ 'SampleVideo_1280x720_1mb.mp4',true).then((entry) => { console.log('download complete: ' + entry.toURL()); }, (error) => { // handle error }); }
Posts: 1
Participants: 1