Hii @onderceylan Will it work in ionic 4 ?
Adding custom transitions/custom modal transition
Ion-datetime - scroll has too much momentum
<ion-item>
<ion-input class="customFullBorderInput" type="date"
[(ngModel)]="fromDate" data-date-format="YYYY-MM-DD">
</ion-input>
</ion-item>
by just setting attribute type="date" it gives you nice date time picker in ionic
Error: advanced-http value must be string
headers should be an object whose values are strings…
when u assign headers as {headers:this.getMcsHeaders()}, you are assigning object as header value that is throwing the error.
Try
this.http.get(this.mcs.mobileBackend.getCustomCodeUrl(mcsConfig.environment + ‘_api_care/my/profile’), {},this.getMcsHeaders())
Failed to install 'cordova-plugin-youtube-video-player': undefined for iOS
Did you solve it? I get similar error while adding the plugin to ios
Installing “cordova-plugin-youtube-video-player” for ios
Failed to install ‘cordova-plugin-youtube-video-player’: undefined
Error: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18/rbconfig.rb:215: warning: Insecure world writable dir /Users/ananthaarni/codebase/sharekeepr/node_modules/.bin in PATH, m
ode 040777
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:439:in `help!’: [!] You cannot run CocoaPods as root. (CLAide::Help)
Reason behind using this keyword in ionic
date: any;
this.date = new Date().toISOString();``
can anyone please help me why do we use this keyword in ts or any other javascript frame work
thanks
Can we use "ng-animate" in ionic 4 for page transitions, and for modal animations
Is there any way to use ng-animate in ionic 4 , if yes , how can we implement them ?
White screen comes scroll fast [List]
When i am scrolling the list fast [has 2000 data] , it shows white screen and data updated very slowly. Is anybody having solution for this. Thanks in advance !
How to use rating star in ionic 4?
thanks , now working perfectly @dotman
How to use rating star in ionic 4?
@aayush2589 You’re welcome if you have issues with styling the stars by reducing the size etc you can ask as well
Ionic cordova build error after install @ionic-native/firebase
I installed firebase in ionic application (https://ionicframework.com/docs/v3/native/firebase/)
After installation, I started to give an error
@ionic-native/firebase/ngx/index.d.ts, found version 4, expected 3
I downgrade version to 3.14.0 and after the app stops building (android version)
then i run
ionic cordova build android --prod --release
or
ionic cordova run android
these errors appear in the console
Configure project :app
WARNING: The onesignal-gradle-plugin MUST be before com.android.application!
Please put onesignal-gradle-plugin first OR update to com.android.tools.build:gradle:3.0.0 or newer!
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
FAILURE: Build failed with an exception.
* Where:
Script 'app/platforms/android/cordova-support-google-services/app-build.gradle' line: 16
* What went wrong:
A problem occurred evaluating project ':app'.
Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin']
For input string: "+"
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
Command finished with error code 1: app/platforms/android/gradlew cdvBuildDebug,-b,app/platforms/android/build.gradle
app/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* Where:
Script 'app/platforms/android/cordova-support-google-services/app-build.gradle' line: 16
* What went wrong:
A problem occurred evaluating project ':app'.
Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin']
For input string: "+"
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
Error: app/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* Where:
Script 'app/platforms/android/cordova-support-google-services/app-build.gradle' line: 16
* What went wrong:
A problem occurred evaluating project ':app'.
Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin']
For input string: "+"
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
at ChildProcess.whenDone (app/node_modules/cordova-common/src/superspawn.js:125:23)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at maybeClose (internal/child_process.js:927:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
[ERROR] An error occurred while running subprocess cordova.
cordova run android --verbose exited with exit code 1.
my dependencies in package.json
"dependencies": {
"@angular/common": "4.1.3",
"@angular/compiler": "4.1.3",
"@angular/compiler-cli": "4.1.3",
"@angular/core": "4.1.3",
"@angular/forms": "4.1.3",
"@angular/http": "4.1.3",
"@angular/platform-browser": "4.1.3",
"@angular/platform-browser-dynamic": "4.1.3",
"@ionic-native/core": "4.3.2",
"@ionic-native/facebook": "^4.2.1",
"@ionic-native/firebase": "3.14.0",
"@ionic-native/firebase-analytics": "^4.5.3",
"@ionic-native/in-app-browser": "^4.4.2",
"@ionic-native/keyboard": "^4.5.2",
"@ionic-native/onesignal": "^4.5.3",
"@ionic-native/social-sharing": "^4.2.1",
"@ionic-native/splash-screen": "3.12.1",
"@ionic-native/status-bar": "3.12.1",
"@ionic/storage": "2.0.1",
"@types/route-parser": "^0.1.1",
"cordova-android": "8.0.0",
"cordova-browser": "5.0.3",
"cordova-custom-config": "^5.1.0",
"cordova-ios": "4.5.4",
"cordova-plugin-console": "^1.1.0",
"cordova-plugin-customurlscheme": "^4.4.0",
"cordova-plugin-device": "^1.1.7",
"cordova-plugin-facebook4": "^1.10.1",
"cordova-plugin-firebase": "2.0.5",
"cordova-plugin-firebase-analytics": "^0.12.1",
"cordova-plugin-inappbrowser": "^1.7.2",
"cordova-plugin-ionic-webview": "^1.2.1",
"cordova-plugin-splashscreen": "^4.1.0",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-plugin-x-socialsharing": "^5.4.1",
"cordova-support-google-services": "^1.0.0",
"es6-promise-plugin": "^4.2.2",
"font-awesome": "^4.7.0",
"fractional": "^1.0.0",
"humps": "^2.0.1",
"ionic-angular": "3.7.1",
"ionic-plugin-keyboard": "^2.2.1",
"ionicons": "3.0.0",
"lodash": "^4.17.5",
"onesignal-cordova-plugin": "^2.4.1",
"pluralize": "^7.0.0",
"route-parser": "0.0.5",
"rxjs": "5.4.0",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.12"
},
"devDependencies": {
"@ionic/app-scripts": "3.2.3",
"typescript": "2.3.4"
},
"description": "Hybrid App",
"config": {
"ionic_copy": "./config/copy.config.js"
},
"cordova": {
"plugins": {
"cordova-plugin-console": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-whitelist": {},
"ionic-plugin-keyboard": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-x-socialsharing": {},
"cordova-plugin-facebook4": {
"APP_ID": "xxxxxxxxxxxx",
"APP_NAME": "xxxxxxx"
},
"cordova-plugin-ionic-webview": {},
"cordova-support-google-services": {},
"cordova-plugin-firebase-analytics": {
"FIREBASE_VERSION": "11.0.+"
},
"onesignal-cordova-plugin": {},
"cordova-plugin-customurlscheme": {
"URL_SCHEME": "xxxxxxx",
"ANDROID_SCHEME": " ",
"ANDROID_HOST": " ",
"ANDROID_PATHPREFIX": "/"
},
"cordova-custom-config": {},
"cordova-plugin-firebase": {}
},
"platforms": [
"browser",
"ios",
"android"
]
}
ionic info
Ionic:
ionic (Ionic CLI) : 4.12.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.7.1
@ionic/app-scripts : 3.2.3
Cordova:
cordova (Cordova CLI) : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.0.0
Cordova Plugins : cordova-plugin-ionic-webview 1.2.1, (and 13 other plugins)
app/platforms/android/cordova-support-google-services/app-build.gradle
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:+'
classpath 'com.google.gms:google-services:3.1.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
}
It wasn`t possible to find a solution, maybe someone has encountered this problem and will help to solve it.
Thank!
Styling ion-label of disabled ion-input
I want to set the opacity of ion-label
of disabled ion-input
where I have the ion-label
in position-floating
<ion-item>
<ion-label position="floating">Submitssion Code</ion-label>
<ion-input name="{{user.fieldName}}" type="{{user.fieldType}}" [disabled]="true" [value]="user.subCode.value"></ion-input>
</ion-item>
I have already set the opacity for ion-input
value if the field is disabled
using following code in global.scss
.native-input[disabled] {
opacity: 10 !important;
}
How can I do the same for ion-label
also. I want that label to be visible properly in any color.
How update tab badge dynamically while user add any item to cart
how update tab badge dynamically while user add any item to cart
please give me some suggestion to do this
Thanks in advance
Text truncation in selected select
Dear Ionites,
I’m trying to show full text of the selected option but text-wrap doesn’t work.
I used the following css to achieve that into the alert with the select options, but cannot make it work after the selection has been made.
.alert-tappable.alert-radio {
height: auto;
contain: content;
}
.alert-radio-label.sc-ion-alert-md,
.alert-radio-label.sc-ion-alert-ios {
white-space: normal;
}
Anyone can give me a tip on how to do that?
Thanks!
Reason behind using this keyword in ionic
The this
keyword indicates that you are referring to an instance variable in “this” object. E.g., your variable date
is an instance variable of “this” object.
When I teach this concept to students, I tell them that the dot operator means “look inside”. So, this.date
tells the compiler to get “this” object, the dot tells the compiler to look inside this object, and date
is found inside the object, and that is what is getting set.
If this is a new concept to you, you may want to study some more object-oriented languages. In C++ this
is used. In python it is self
. E.g.
Apple rejected my app: UIRequiredDeviceCapabilities key
Ok, I’ll try to add this info manually, but what info I should add ?
My app is very simple, I don’t need any specific hardware (gps, bluetooth, ecc.), the only thing that my app do is fetch data from a rest API and show it to the user.
LokiDB persistenceAdapter error
I get this error when setting up LokiDB.
ERROR Error: Uncaught (in promise): Error: persistenceAdapter not configured.
import {Loki} from "@lokidb/loki";
export class LokiService {
db: any; // LokiJS database
constructor() {
console.log('Loki initialization');
this.db = new Loki('db', {env:"CORDOVA"});
}
How to execute periodic tasks?
Hi,
I have to send periodically some data from the app to the server.
I’m using this code to start the sending:
this.timerSendDataToServer = setInterval(this.sendGeolocationDataToServer, 10000, this.device.getValue(), pageObject);
And this code to stop the sending:
clearInterval(this.timerSendDataToServer);
This code works testing the app with Chrome and deploying it on my Android phone.
However, on other devices, especially iOS, it doesn’t seem to work.
That is the trigger doesn’t start every 10 seconds.
So the question is, is this the best way to execute periodic tasks or there are better methods?
Thank you.
cld
Ionic4: Execution failed for task ':app:processDebugManifest'
the solution:
No permission to read a file my app wrote to /Data dir?
When I try to play a file using my html5 <audio>
tag, I get this error now:
2019-06-24 08:33:08.595 19791-19861/io.ionic.starter E/Capacitor: Unable to open asset URL: http://localhost/_capacitor_file_/DATA/EN-1.mp3
I’ve used webview convertFileSrc() to get this URL. As far as I can tell, the file is there – I didn’t see errors when copying the file there using capacitor Filesystem.
Anyone know why I cannot open that url?
How to get rid of ios "Undo typing" when you shake the device?
Hi,
how did you use cordova-plugin-ios-disableshaketoedit
?
I’ve installed it with:
ionic cordova plugin add cordova-plugin-ios-disableshaketoedit
Is this enough?
Thank you
cld