thank you for your input, I managed to do get the configuration in a different way.
I’m sorry I haven’t worked yet on the IOS version, I’m still stuck with Android…
thank you for your input, I managed to do get the configuration in a different way.
I’m sorry I haven’t worked yet on the IOS version, I’m still stuck with Android…
What is your ionic info
output?
Does it work with a new app created with ionic start
?
Thank you for putting your time into this.
C:\Users\anant\chat>npm install firebase angularfire2 --save
npm WARN angularfire2@4.0.0-rc0 requires a peer of @angular/common@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angularfire2@4.0.0-rc0 requires a peer of @angular/compiler@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angularfire2@4.0.0-rc0 requires a peer of @angular/core@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angularfire2@4.0.0-rc0 requires a peer of @angular/platform-browser@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angularfire2@4.0.0-rc0 requires a peer of @angular/platform-browser-dynamic@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angularfire2@4.0.0-rc0 requires a peer of firebase@^3.6.6 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})
What’s your package.json?
I did that. However, it always switches on the Webcam. I wasn’t able to select images from local disks. Actually something wrong with launching the actionsheet. Everything works on ios/anroid though.
Capacitor is buggy still. Now I am building my webapp using normal ionc 3 stuff(no cordova) and I am migrating my ionic 1 app to ionic 3+ionic native. Looks like it’s going to take a while before the new stack release and becomes stable. So the one codebase dream won’t come true any soon
{
"name": "chat",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"@angular/animations": "5.2.9",
"@angular/common": "5.2.9",
"@angular/compiler": "5.2.9",
"@angular/compiler-cli": "5.2.9",
"@angular/core": "5.2.9",
"@angular/forms": "5.2.9",
"@angular/http": "5.2.9",
"@angular/platform-browser": "5.2.9",
"@angular/platform-browser-dynamic": "5.2.9",
"@ionic-native/core": "4.6.0",
"@ionic-native/google-plus": "^4.7.0",
"@ionic-native/splash-screen": "4.6.0",
"@ionic-native/status-bar": "4.6.0",
"@ionic/storage": "2.1.3",
"angularfire2": "^4.0.0-rc0",
"cordova-android": "7.0.0",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-googleplus": "^5.3.0",
"cordova-plugin-ionic-keyboard": "^2.0.5",
"cordova-plugin-ionic-webview": "^1.2.0",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-whitelist": "^1.3.3",
"firebase": "^4.13.1",
"ionic-angular": "3.9.2",
"ionicons": "3.0.0",
"rxjs": "5.5.8",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.26"
},
"devDependencies": {
"@ionic/app-scripts": "3.1.8",
"typescript": "~2.6.2"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-googleplus": {
"REVERSED_CLIENT_ID": "com.googleusercontent.apps.529165664602-tpl6g40utvsr1bot8ofimkcmdl0tll3k"
},
"cordova-plugin-whitelist": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-ionic-keyboard": {}
},
"platforms": [
"android"
]
}
}
Oh My Precious. This literary saved my back.
THANK YOU
nothing new? same thing happens here.
Remove the angularfire2 line, and the firebase line, and try again. You should be installing AF 5, not AF 4. Are you updating from an old version of your project? You might need to clear the cache also.
<ion-content>
<ion-scroll scrollY="true">
<ion-list *ngFor="let eachVisitedPlace of offersCommonData.previouslyVisitedBeaconsAndGeofences">
<button ion-item (click)="showPreviousLocationOffers(eachVisitedPlace)">
{{eachVisitedPlace.locationName}}
</button>
</ion-list>
</ion-scroll>
</ion-content>
.list-md{
margin: 0px;
border-bottom: 1px solid lightgray;
}
ion-scroll { white-space: nowrap; }
}
I changed the css and html.Still it’s not showing scrollbar.
Thanks worked for me
Your bleeding edge NPM package is bleeding
I’m currently working on a Ionic&AngularFire project that was generated in late February’18 and my Angular dependencies are 5.0.3
my firebase is 4.10.1
and my angularfire2 is ^5.0.0-rc.6
so my rough guess is that your very old version of angularfire2 cannot talk to your advanced firebase.
You may be able to do this using [ngStyle] or [ngClass]…
<ion-item>
<input [(ngModel)]="firstName" [ngStyle]="{'border-color': firstName.length ? 'red' : 'transparent'}">
</ion-item>
<ion-item>
<input [ngClass]="firstName.length ? 'active' : 'inactive'">
</ion-item>
(not tested, so you will probably need to look at the docs linked above)
Could you still try adding the height to the css?
And what about the browser - does it work there?
Can you just use ngIf
?
<ion-select *ngIf="kids" interface="popover" [ngModel]="selectedKidId">
<ion-option *ngFor="let kid of kids" [value]="kid.id">{{kid.name}}</ion-option>
</ion-select>
<div *ngIf="!kids">Dang, no kids...</div>
If not, you might need to handle this in your component class, e.g.
ionViewDidEnter() {
if (!this.kids) {
// do modal
}
}
So ?? No one have any idea ?
i keep getting this error when i try to use ioninfinite scroll
something seems to be broken or maybe i am not importing something
I very urgently need someone to develop an ionic app. The app will be extremly easy for someone who has experience, maybe less than a day work. Contact me for details. There will be payment of course.
“It is far better to explicitly depend on cordova, and on the version of npm you need.”
Yes @ShadSterling, I agree with that, and that is why I had put cordova on my devDependencies.
But that caused cordova to ignore the npm version specified on the project package.json and utilize his own version of npm on the Ionic Pro build.
If you will not use the Ionic Pro build system and will distribute it outside Ionic Pro you will not suffer from this issue.
This whole issue is related to Ionic Pro building.
And specifying both cordova and npm versions on the package.json will lead to your build use 2 different versions of npm at build time, leading to cordova not being able to locate some dependencies.
And this was only my experience with 2 different projects that lead to the same behavior.
I can’t confirm this with newer versions of cordova because I just finished the projects and will not work with Ionic for a long time.
Hi there,
I’ve recently started to try and use the file chooser in ionic.
I want it so that the user can choose a picture from their gallery, to then upload to firebase storage.
Here is my code…
// This function allows users to upload a profile photo from their gallery
uploadFromGallery()
{
this.fileChooser.open().then((uri) => {
alert(uri);
this.file.resolveLocalFilesystemUrl(uri).then((newUrl) => {
alert(JSON.stringify(newUrl));
let dirPath = newUrl.nativeURL;
let dirPathSegments = dirPath.split('/'); //breaks string into array
dirPathSegments.pop(); // remove last element
dirPath = dirPathSegments.join('/');
this.file.readAsArrayBuffer(dirPath, newUrl.name).then(async (buffer) => {
await this.upload(buffer, newUrl.name);
})
})
})
}
// Function which uploads the actual photo to Firebase
async upload(buffer, name)
{
let blob = new Blob([buffer], {type: "image/jpeg"});
let storage = firebase.storage();
storage.ref('ProfilePictures/' + name).put(blob).then((d) => {
alert("Image Upload Done!");
}).catch((error) => {
alert(JSON.stringify(error))
})
}
It runs without error but the file doesn’t get uploaded to firebase storage… any suggestions?
I generated my code by watching this tutorial…
Many thanks