So you want to store the files in firebase storage and retrieve them then represent them in the HTML?
Or are you storing them in firebases database as text?
So you want to store the files in firebase storage and retrieve them then represent them in the HTML?
Or are you storing them in firebases database as text?
I'd sort them in your page class myself.
Something along the lines of:
this.videoComments.forEach(comment => {
comment.replies.comments = comment.replies.comments.sort((a, b) => new Date(b.publishedAt) - new Date(a.publishedAt));
});
The InAppBrowser plugin isn't maintained by Ionic, so you may want to look into and/or open an issue on the official bug tracker:
https://issues.apache.org/jira/browse/CB/component/12320641/?selectedTab=com.atlassian.jira.jira-projects-plugin:component-summary-panel
I agree. Don't sort in your template. It will kill the performance of your page.
My advice is: get a bigger disk. Once you have a few different projects going at the same time, they are all going to have different dependencies. And a library could introduce a breaking change at any time, so different projects won't all be running the same version of a library.
I'm following an Ionic 2 course on Plura Sight and I'm unable to install the ionic cordova native local notification plugin as described on Ionic's site:
$ ionic cordova plugin add de.appplant.cordova.plugin.local-notification
$ npm install --save @ionic-native/local-notifications
An error occurred while running cordova plugin add
de.appplant.cordova.plugin.local-notification --save (exit code 1):
Installing "de.appplant.cordova.plugin.local-notification" for android
Plugin dependency "cordova-plugin-device@1.1.4" already fetched, using
that version.
Dependent plugin "cordova-plugin-device" already installed on android.
Failed to install 'de.appplant.cordova.plugin.local-notification': Error
at
/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:205:33
and
ELOOP: too many symbolic links encountered, open '/Users/laroca/Documents/elite-schedule-app/node_modules/cordova-plugin-app-event/package.json'
I haven't been able to find a solution online.
Yes, I did a lot (and done more) of Googling, but nothing has helped. I can't even add or remove the wkwebview on Windows. I have added git paths to my environmental variables, and tried changing the "git+https://' prefix to just git://
ie
<plugin name="cordova-plugin-wkwebview-engine" spec="git://github.com/driftyco/cordova-plugin-wkwebview-engine.git" />
But the error still mentions https...
npm ERR! git fetch -a origin (https://github.com/driftyco/cordova-plugin-wkwebview-engine.git) fatal: Unable to
find remote helper for 'https
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program
Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
"git+https://github.com/driftyco/cordova-plugin-wkwebview-engine.git" "--save"'
So it is still trying the git+http
even though I have removed this from the config.xml.
It just appears having the wkwebview
means you can now not use the project on windows anymore. Very weird and frustrating that windows platform should even look at this plugin. Perhaps I need to go back to mac and remove it (but then I loose what i needed the wkwebview
for on iOS, unless I just have a different iOS branch (which would be a nightmare for maintenance).
<div [inner-html]="content.flowchart"></div>
... will display the content as html.
{{content.flowchart}}
...will display it as literal text.
Im currently developing an Ionic 3 Application and it works in the Browser/Emulator and 2 different iPhones (5, 5s) with iOS 10 on them but if i put it on iOS 9 (iPhone SE) i get a Blackscreen i didn't tested Android.
The strange part is the buttons work and i can acces the camera, i just don't see anything from the app itself. Also i have experienced a very slow performance on the other 2 iPhones is there any fix for the performance aswell ?
Im on the latest version from Ionic and Cordova etc.
Can someone help me with my problem ?
Thanks, regards!
Hi,
I can't seem to get the ion-select box to close via the close() function.
I did the following:
import { Select } from 'ionic-angular';
export class AddAccountPage {
@ViewChild('myselect') select: Select;
...
closeSelect(){
this.select.close();
}
openSelect(){
this.select.open();
}
}
I know I selected the right one because this.select.open() works.
Did I miss something?
Any help would be appreciated.
First, you should add a JSON header:header('Content-Type: application/json');
I do not have storage anywhere else
Hi everyone, I'm doing an application with Geolocation and Google Maps. I'm trying to make a "location" selector with Ionic Native Plugin (https://ionicframework.com/docs/native/google-maps/) but I need to place a "searchbar" in the top of the map to search an address (#, street, city).
I read a lot of blogs and also asked in Github but it seems that Places searchbar is not currently supported, so Instead of using Ionic Native Plugin I tried to use Google Maps API in Javascript but it does not shows the map in a real device. I'm a little desperate because I can't believe there are no examples of this in the internet...
Can you help me?
ya vi que pasó, estas pasando el pedido.id_menu , pero no estas haciendo nada con el . te recomiendo pasar el objeto pedido completo y luego actualizar usando el objeto pedido.
algo como $scope.selectedPedido = pedido [ index] para saber cual estas pasando.
saludos y suerte
You need to add native audio.
Follow this guide
-> click me <-
To play the sound when you enter the Page use this Angular function.
ngAfterViewInit() {
YOUR CODE GOES HERE
}
This should do it
Could you provide more information about your code in the .ts file ?
What you could do to hotfix your "disconnect" to "really" problem is.
<ion-col col-4>
<button ion-button full (click)="onDisconnect()" id="disconnect" style="display:block">Disconnect</button>
<button ion-button full (click)="onReally()" id="really" style="display:none">Really</button>
</ion-col>
In typescript add this code to your function when you want to show the really button.
yourFunction(){
document.getElementById('really').style.display = 'block';
document.getElementById('disconnect').style.display = 'none';
}
Like i said this is just a very simple way todo it and there are alot better ways todo this.
Try using console.log to make sure that you are talking to the right button. I don't see any mistakes in your code. Did you tried to put the "this.select.close();" away from your function. Since you usually don't need to code the open and close function unless you want to add extra code to it.
closeSelect(){
console.log('close select works");
}
I can set mode for alert like alert.setMode("ios");
but is this possible to change action sheet mode.
If you want to learn to work with Ionic then you should check out this links.
You have to get familiar with Angular since you will have to use alot of commands from it and its a very usefull/powerfull language.
->ANGULAR<-
Typescript is the next thing you need to learn its similar to Javascript.
->TYPESCRIPT<-
HTML
->HTML (3rd Party site but explains things very well for beginners)<-
CSS
->CSS (same website from html)<-
Next thing is you have to understand how Ionic works.
As example one page has 4 Files in it.
.ts
.css
.html
module.ts
.ts -> Typescript, for your coding
.css -> CSS, to style your Page.
.html -> HTML, to create buttons and other stuff what you need for your Page.
.module -> Modules, here you add modules.
So this is the first things you should know about ionic. The best way to learn how it works is to create a demo project.
First install ionic
npm install -g ionic cordova
ionic start
After you typed in ionic start you should get a list with what you want to start with such as blank or tabs etc. Start with tabs and choose a name for your test app.
ionic serve
What you should do now is to check out how the app reacts if you change something in the app.component.ts or to the pages itself. Watch some youtube videos and read tutorials.
The key to understand Ionic is to test out many things and reading tutorials. Then you will also understand what the modules and native stuff is used for.
Good luck with your coding in the future!
I'm using moment.js, you could just stick to the Date class.
import { Pipe, PipeTransform } from '@angular/core';
import moment from 'moment';
@Pipe({
name: 'sortByDatetime',
})
export class SortByDatetime implements PipeTransform {
transform(value: any, keyName?: string): Object[] {
value.sort((a: Object, b: Object): number => {
var first = moment(a[keyName], 'YYYY-MM-DD HH:mm:ss');
var second = moment(b[keyName], 'YYYY-MM-DD HH:mm:ss');
// console.log('SortBy: Compare ' + first.format('YYYY-MM-DD HH:mm:ss') + ' to ' + second.format('YYYY-MM-DD HH:mm:ss'));
return first.isBefore(second) ? -1 : first.isAfter(second) ? 1 : 0;
});
return value;
}
}
Call it using
<ion-item *ngFor='let reply of comment.replies.comments | sortByDatetime:"publishedAt"'>