Ionic 5 Tutorial: Create Ionic Calculator App (Angular)
Where is list of Ionic 4 icons
@Liquidcms wrote:
There used to be a website that listed the Ionic 4 icons; but it seems to have been replaced by the list of Ionic 5 icons. My guess is these go with Ionic 5, correct. As i pick one from the list and it doesn’t show anything in my Ionic 4 app.
Posts: 1
Participants: 1
How to refresh a page for only one time?
@scharli wrote:
I wants to refresh a page for only one time using angular 7.
I have tried
ngOnInit(){
let win = (window as any);
if(win.location.search !== ‘?loaded’ ) {
win.location.search = ‘?loaded’;
win.location.reload();
}
}
but this code refresh the page continuously.
Please someone give me solution, Thanks in advance.
Posts: 1
Participants: 1
Collapsible Title on Android
@psenechal wrote:
I have collapsible title/header working perfectly fine on iOS, but I launched an Android simulator and noticed that it doesn’t function at al…the title is out of place and it doesn’t behave the samel. Is that expected? Is that feature only available for iOS? Thanks.
Posts: 1
Participants: 1
Want to add one more character to dayValues in ion-datetime
@pdj wrote:
I added one more character after month, but can’t add it to day values.
<ion-datetime displayFormat="YYYY/MMM/D" dayValues="1일,2일,3일,04,05,06,08,09,10, 11, 12, 13, 14" pickerFormat="YYYY/MMM/D" monthShortNames='1월, 2월, 3월, 4월, 5월, 6월, 7월, 8월, 9월, 10월, 11월, 12월' doneText="확인" cancelText="취소" ></ion-datetime>
I tested it as above adding one more character to dayvalues, but it’s works same as above, not showing character but only number
I wrapped ’ ’ but in that cases , it’s not showing values
how can I add one more character to day values?
Posts: 1
Participants: 1
Using Gestures Utility
@briant wrote:
I’m trying to use the Gesture utility with code below directly from example on site…
and getting this error:
Error:> "Uncaught TypeError: Cannot read property ‘__zone_symbol__addEventListener’ of null"
Code using:
pg = document.querySelector('.ppp'); gesture: Gesture = createGesture({ el: document.querySelector('.target-section'), threshold: 15, gestureName: 'my-gest', onMove: (detail) => { console.log('test'); //this.onMove(detail) } }); //gesture.enable(); onMove = (detail:any) => { console.log('IN IN IN MOVE!'); const type = detail.type; const currentX = detail.currentX; const deltaX = detail.deltaX; const velocityX = detail.velocityX; //let pg = document.querySelector('p'); this.pg.innerHTML = ` <div>Type: ${type}</div> <div>Current X: ${currentX}</div> <div>Delta X: ${deltaX}</div> <div>Velocity X: ${velocityX}</div> ` }
I’m triggering on a button call when clicked … any ideas anyone? and thaaanks! in advance
Posts: 1
Participants: 1
Ionic capacitor notifications
@luiru72 wrote:
I have an ionic capacitor app that needs to receive notifications from the server and, as soon as the notifications are received, show a couple of buttons like ‘ok’ or ‘cancel’ to the user. I am new to mobile and ionic development, so any suggestions would be more than welcome.
following the ionic notifications tutorial (https://capacitor.ionicframework.com/docs/guides/push-notifications-firebase/) I created an Android app that receives notifications. I noticed that if the app is in foreground, the notification is received directly from the app. If the app is in background or killed, the notification is received from the system and only when the user taps the notification, the notification is received from the app. Is it possible to make the app receive directly the notification when the app is in background or killed, too?
may I directly receive a notification with some actions (i.e. buttons ‘ok’ and ‘cancel’)? Or should the app first receive the notification and then create a new notification to the user with the two buttons?
Posts: 1
Participants: 1
Ionic 4 code map not work on android but work on ios
@sehsah2020 wrote:
hi,
i need ask about my code it,
show location user and can click in mark to get new location and address
it worked well on web and ios but on android show blank white
why ??? where problemionViewDidLoad() { this.platform.ready().then(() => { this.loadMap(); }); } loadMap() { Environment.setEnv({ 'API_KEY_FOR_BROWSER_RELEASE': '(``)', 'API_KEY_FOR_BROWSER_DEBUG': '' }); LocationService.getMyLocation().then((myLocation: MyLocation) => { let options: GoogleMapOptions = { camera: { target: myLocation.latLng, zoom: 17, } }; this.map = GoogleMaps.create('map_canvas', options); this.marker = this.map.addMarkerSync({ title: 'Ionic', icon: { url: 'assets/images/place2.png', size: { width: 32, height: 32 } }, position: myLocation.latLng, }); this.marker.on(GoogleMapsEvent.MARKER_CLICK) this.map.on(GoogleMapsEvent.MAP_CLICK).subscribe((data) => { this.lat = data['0']['lat'] this.lat = data['0']['lng'] console.log(data['0']['lat'], data['0']['lng']) localStorage.setItem('latitude', data[0]['lat']) localStorage.setItem('longitude', data[0]['lng']) localStorage.setItem('district', data[0]['subLocality']) this.GetNewlocation(data['0']['lat'], data['0']['lng']) this.marker.remove() this.marker = this.map.addMarkerSync({ title: 'Ionic', icon: { url: 'assets/images/place2.png', size: { width: 32, height: 32 } }, position: { lat: data['0']['lat'], lng: data['0']['lng'] }, }); this.marker.on(GoogleMapsEvent.MARKER_CLICK) } ); }); }
Posts: 1
Participants: 1
Different lists in different slides scrolling at same time
@RodrigoSaPessoa wrote:
I have two ionic slides, each containing a regular list.
My problem is that each time I scroll on one of them, the other scrolls at the same time.Is there a way to make each list scroll individually?
My code somewhat like this:
<ion-content> <ion-slides> <ion-slide> <ion-list> ... </ion-list> </ion-slide> <ion-slide> <ion-list> ... </ion-list> </ion-slide> </ion-slides> </ion-content>
Thank you
Posts: 1
Participants: 1
How can I view the images made in the Ionic tutorial photo gallery app
@rvrwow wrote:
Hi,
I followed the Ionic v4 tutorial and ‘created’ the photo gallery app as found in the Ionic documentation.
I now tried to expand it by using Photoviewer to fullscreen the image individually when clicking on the image.
In the example code this is given:
*ngFor="let photo of photoService.photos; index as position">
<ion-img src="{{ photo.base64 ? photo.base64 : photo.webviewPath }}" (click)="showActionSheet(photo, position)"></ion-img>
This displays the photos in the gallery. I now tried to give showActionSheet another argument that would be used with Photoviewer to find the location. However, if I try
(click)="showActionSheet(photo, position,photo.webviewPath)
or
(click)="showActionSheet(photo, position,photo.base64 ? photo.base64 : photo.webviewPath)
I do see that the Photoviewer on my phone is working but it gives an error that it cannot find the image. Would anyone know how to correctly link to an image from local storage?
The strange thing is that the images are displaying so the src link is working but the link does not work when I click on them individually.
Posts: 1
Participants: 1
NSURLConnection Error in iOS 'ionic v1'
@mustafademirx wrote:
Hi, when i want to login to my app, i take this error:
NSURLConnection finished with error - code -1004
Posts: 1
Participants: 1
Issue with offset-top on ion-content in Ionic 5
@neamtua wrote:
Hello,
I’m trying to have a transparent header with toolbar over my content in my Angular Ionic 5 project.
The problem with the content is that, while it scrolls under the header and the header is transparent, when the page renders the content is actually spaced after the header.
I’ve noticed in css that ion-content has --offset-top set to something like 44px
If i try to remove that offset and set it to 0, the content looks ok on certain resolutions, but on others it places the content way above, cutting it off.I have no idea what else to do. Everything I found online, mostly regarding to ionic 4, just setting the css of the header to transparent background and fullscreen on content should’ve worked… except it doesn’t. I have run out of ideas. Please help.
<ion-header mode="ios"> <ion-toolbar> <ion-buttons slot="start"> <ion-menu-button color="dark"> <img src="assets/Meniu_Icon_1.png" /> </ion-menu-button> </ion-buttons> </ion-toolbar> </ion-header> <ion-content fullscreen="true"> <ion-slides pager [options]="slideOptsOne"> <ion-slide> <div class="slide"> <img src="assets/listing/Container_poza_1.png"/> </div> </ion-slide> <ion-slide> <div class="slide"> <img src="assets/listing/Container_poza_2.png"/> </div> </ion-slide> <ion-slide> <div class="slide"> <img src="assets/listing/Container_poza_3.png"/> </div> </ion-slide> </ion-slides> </ion-content>
ion-toolbar { --background: transparent !important; --ion-color-base: transparent !important; --border-color: transparent; } ion-content { --offset-top: 0 !important; }
Posts: 1
Participants: 1
Problems with Ionic 4 and Braintree on iOS - App Crashes
@ciccilleju wrote:
hello!
I really need your help
I’m doing an app with Ionic 4 and cordova-plugin-braintree version 0.5.1 (i tried the other forks but i can’t compile).With Android everything works fine.
With iOs i’m having trouble making it work:
I can access the paypal account, choose the card and the payment method but when i choose to pay the app crashes and i get this error:
2020-03-03 10:45:27.414499+0100 Single Fin App[53289:11332367] Connection 7: unable to determine interface type without an established connection
2020-03-03 10:45:27.414547+0100 Single Fin App[53289:11332367] Connection 7: unable to determine fallback status without a connection
2020-03-03 10:45:29.186 Single Fin App[53289:11316095] Untrusted SSL certificate chain. Refusing to communicate with PayPal servers.
2020-03-03 10:45:29.189591+0100 Single Fin App[53289:11332366] Task <01FE38F8-CD3E-478A-ADEE-5CFD2F8E8994>.<0> HTTP load failed, 0/0 bytes (error code: -999 [1:89])
2020-03-03 10:45:36.659198+0100 Single Fin App[53289:11316095] CDVIonicKeyboard: updating frame
2020-03-03 10:45:39.434503+0100 Single Fin App[53289:11316095] CDVIonicKeyboard: updating frame
2020-03-03 10:45:43.809588+0100 Single Fin App[53289:11316095] CDVIonicKeyboard: updating frame
2020-03-03 10:45:49.196546+0100 Single Fin App[53289:11316095] CDVIonicKeyboard: updating frame
2020-03-03 10:45:55.487106+0100 Single Fin App[53289:11316095] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[3]’
*** First throw call stack:
(
0 CoreFoundation 0x00000001036ed27e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x0000000101d00b20 objc_exception_throw + 48
2 CoreFoundation 0x000000010377fab1 _CFThrowFormattedException + 194
3 CoreFoundation 0x000000010378a4c6 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:].cold.4 + 38
4 CoreFoundation 0x000000010374ad97 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 247
5 CoreFoundation 0x00000001036e912b +[NSDictionary dictionaryWithObjects:forKeys:count:] + 59
6 Single Fin App 0x0000000100b58ff8 -[BraintreePlugin getPaymentUINonceResult:] + 1928
7 Single Fin App 0x0000000100b58597 -[BraintreePlugin dropInViewController:didSucceedWithTokenization:] + 183
8 BraintreeUI 0x000000010106c610 -[BTDropInViewController informDelegateDidAddPaymentInfo:] + 140
9 BraintreeUI 0x000000010106e4b5 -[BTDropInViewController paymentButtonDidCompleteTokenization:fromViewController:error:] + 266
10 BraintreeUI 0x0000000101069256 __44-[BTDropInViewController initWithAPIClient:]_block_invoke + 82
11 BraintreePayPal 0x0000000100fd4697 __57-[BTPayPalDriver setAppSwitchReturnBlock:forPaymentType:]_block_invoke_3 + 254
12 libdispatch.dylib 0x0000000105d78dd4 _dispatch_call_block_and_release + 12
13 libdispatch.dylib 0x0000000105d79d48 _dispatch_client_callout + 8
14 libdispatch.dylib 0x0000000105d87de6 _dispatch_main_queue_callback_4CF + 1500
15 CoreFoundation 0x0000000103650049 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9
16 CoreFoundation 0x000000010364aca9 __CFRunLoopRun + 2329
17 CoreFoundation 0x000000010364a066 CFRunLoopRunSpecific + 438
18 GraphicsServices 0x0000000108bcdbb0 GSEventRunModal + 65
19 UIKitCore 0x000000010c0fdd4d UIApplicationMain + 1621
20 Single Fin App 0x0000000100b56811 main + 65
21 libdyld.dylib 0x0000000105e01c25 start + 1
22 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)this is my AppDelegate file
@implementation AppDelegate
- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
self.viewController = [[MainViewController alloc] init];
[BTAppSwitch setReturnURLScheme:@“com.nastydevops.singlefin.payments”];
return [super application:application didFinishLaunchingWithOptions:launchOptions];}
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
if ([url.scheme localizedCaseInsensitiveCompare:@“com.nastydevops.singlefin.payments”] == NSOrderedSame) {
return [BTAppSwitch handleOpenURL:url options:options];
}
return NO;
}Do you have any idea?
thanks!
Posts: 1
Participants: 1
Setting --background on ioc-content variable hides Google Map
@viiskis wrote:
Setting --background variable on ioc-content hides my embeded Google Map. How I can change the background and still see my map?
Posts: 2
Participants: 2
Cordova plugin firebase not working in ionic 3
@rajubootla wrote:
Dear Community,
I am struggling with firebase plugin in ionic 3. But no one is working,
because of some plugin build failed or m not getting token.
I am using ionic 3 with angular 5, I just want push notification,Crashlytic using firebase
Please help and guide me. Thanks1.step==>Add plugin
ionic cordova plugin add cordova-plugin-firebase npm install --save @ionic-native/firebase@4
2.Step==>Add platform
ionic cordova platform add android@8.1.03.step ==>Build Android
ionic cordova run android --devicesError==>
i got error like this plugin_not_installed
Try===>
i was try to this step
1.remove platform or add platform
2.remove plugins or add plugins
3.delete node-modules and reinstall npm====> not working
Ionic Info
cli packages: (C:\Users\PC\AppData\Roaming\npm\node_modules)
@ionic/cli-utils : 1.9.2 ionic (Ionic CLI) : 3.9.2
global packages:
Cordova CLI : 8.0.0
local packages:
@ionic/app-scripts : 3.1.9 Cordova Platforms : android 8.1.0 browser 5.0.4 ios 5.1.1 Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1 Node : v8.11.2 npm : 5.6.0 OS : Windows 10
Posts: 4
Participants: 2
Ionic React - Styled components Unexpected token
@kolbis wrote:
I am using a third-party library that uses styled components
when trying to run ionic build I am getting: “Module parse failed: Unexpected token”
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loadersthe line that breaks the build is const Box = props => <StyledBox {…props} />;
inside this file Box.jsx
import React from ‘react’;import styled from ‘styled-components’;
import PropTypes from ‘prop-types’;
import { match } from ‘…/…/…/helpers/styledIs’;
// CONSTS
export const DIRECTION_OPTIONS = [‘row’, ‘rowReverse’, ‘column’, ‘columnsReverse’];
export const DEFAULT_DIRECTION = ‘row’;
export const WRAP_OPTIONS = [‘nowrap’, ‘wrap’, ‘wrapReverse’];
export const DEFAULT_WRAP = ‘nowrap’;
export const ALIGN_ITEMS_OPTIONS = [‘stretch’, ‘center’, ‘start’, ‘end’, ‘baseline’];
export const DEFAULT_ALIGN_ITEMS = ‘stretch’;
export const ALIGN_CONTENT_OPTIONS = [
‘stretch’,
‘center’,
‘start’,
‘end’,
‘spaceBetween’,
‘spaceAround’,
‘spaceEvenly’,
];
export const DEFAULT_ALIGN_CONTENT = ‘stretch’;
export const JUSTIFY_CONTENT_OPTIONS = [
‘center’,
‘start’,
‘end’,
‘spaceBetween’,
‘spaceAround’,
‘spaceEvenly’,
];
export const DEFAULT_JUSTIFY_CONTENT = ‘start’;
const StyledBox = styled.div`
width: ${props => props.width};
height: ${props => props.height};
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: flex-start;
align-content: stretch;
/********************************* display *********************************/
/***************** http://cssreference.io/property/display *****************/
${match(‘inline’, true)`
display: inline-flex;
`};
/******************************** direction ********************************/
/************** http://cssreference.io/property/flex-direction **************/
${match(‘direction’, ‘row’)`
flex-direction: row; /* default */
`};
${match(‘direction’, ‘rowReverse’)`
flex-direction: row-reverse;
`};
${match(‘direction’, ‘column’)`
flex-direction: column;
`};
${match(‘direction’, ‘columnReverse’)`
flex-direction: column-reverse;
`};
/*********************************** wrap ***********************************/
/**************** http://cssreference.io/property/flex-wrap ****************/
${match(‘wrap’, ‘nowrap’)`
flex-wrap: nowrap; /* default */
`};
${match(‘wrap’, ‘wrap’)`
flex-wrap: wrap;
`};
${match(‘wrap’, ‘wrapReverse’)`
flex-wrap: wrap-reverse;
`};
/***************************** justify-content *****************************/
/************* http://cssreference.io/property/justify-content *************/
${match(‘justifyContent’, ‘start’)`
justify-content: flex-start; /* default */
`};
${match(‘justifyContent’, ‘end’)`
justify-content: flex-end;
`};
${match(‘justifyContent’, ‘center’)`
justify-content: center;
`};
${match(‘justifyContent’, ‘spaceBetween’)`
justify-content: space-between;
`};
${match(‘justifyContent’, ‘spaceAround’)`
justify-content: space-around;
`};
${match(‘justifyContent’, ‘spaceEvenly’)`
justify-content: space-evenly;
`};
/****************************** align-content ******************************/
/************** http://cssreference.io/property/align-content **************/
${match(‘alignContent’, ‘start’)`
align-content: flex-start;
`};
${match(‘alignContent’, ‘end’)`
align-content: flex-end;
`};
${match(‘alignContent’, ‘center’)`
align-content: center;
`};
${match(‘alignContent’, ‘spaceBetween’)`
align-content: space-between;
`};
${match(‘alignContent’, ‘spaceAround’)`
align-content: space-around;
`};
${match(‘alignContent’, ‘spaceEvenly’)`
align-content: space-evenly;
`};
${match(‘alignContent’, ‘stretch’)`
align-content: stretch; /* default */
`};
/******************************* align-items *******************************/
/*************** http://cssreference.io/property/align-items ***************/
${match(‘alignItems’, ‘start’)`
align-items: flex-start;
`};
${match(‘alignItems’, ‘end’)`
align-items: flex-end;
`};
${match(‘alignItems’, ‘center’)`
align-items: center;
`};
${match(‘alignItems’, ‘baseline’)`
align-items: baseline;
`};
${match(‘alignItems’, ‘stretch’)`
align-items: stretch;
`};
`;
const Box = props => <StyledBox {…props} />;
Box.defaultProps = {
inline: false,
direction: DEFAULT_DIRECTION,
wrap: DEFAULT_WRAP,
alignItems: DEFAULT_ALIGN_ITEMS,
alignContent: DEFAULT_ALIGN_CONTENT,
justifyContent: DEFAULT_JUSTIFY_CONTENT,
width: ‘auto’,
height: ‘auto’,
};
Box.propTypes = {
/** Sets display to inline-flex.
- If true, element will not end with a line break.
*/
inline: PropTypes.bool,
/** Establishes the main-axis direction flow of the box. */
direction: PropTypes.oneOf(DIRECTION_OPTIONS),
/** Set how box item will be wrapped. */
wrap: PropTypes.oneOf(WRAP_OPTIONS),
/** This defines the default behavior for how flex items are laid out
- along the cross axis on the current line.
*/
alignItems: PropTypes.oneOf(ALIGN_ITEMS_OPTIONS),
/** This aligns a flex container’s lines within when there is extra space in the cross-axis */
alignContent: PropTypes.oneOf(ALIGN_CONTENT_OPTIONS),
/** This aligns a flex container’s lines within when there is extra space in the main-axis */
justifyContent: PropTypes.oneOf(JUSTIFY_CONTENT_OPTIONS),
/** The width of the box */
width: PropTypes.string,
/** The height of the box */
height: PropTypes.string,
};
export default Box;
Any idea how can i solve it?
Posts: 1
Participants: 1
Ion-slides Performance Issue
@gdeveloper18 wrote:
We are using ion-nav inside ion-slide (linked with ion-segment) in order to achieve swipeable feature (like swipeable tabs).
No problems with browsers and android, but when testing with iPad the app starts very slow and then a white to death screen is present knowing that the app is running perfectly on iPhone.
There are about 12 slides viewed at the same time. We tried to present only 3 slides, so the app did not show white screen, but it was very slow!
It is strange how it is running on iPhones very smoothly but on iPad is showing white to death screen!
We had removed all unwanted plugins and re-added a fresh ios platform in our ionic project, and tested the app with and without the --prod flag, but the same result!
Any one have an idea?!
Tested iPad: iPad mini 2 - version 12.4.4
Tested iPhones version 13.x.xThis is the memory status when debugging on iPad with XCode.
Posts: 1
Participants: 1
Increase width of Alert Controller
@mulla-azzi wrote:
I would like to know, how can i increase width of an Alert Controller in ionic4.
I have tried many techniques but haven’t succeeded in any. I have created a stackblitz example for clarity. Here i have button on click of which, the alert appears but i want the alert to be more broad. I have also added a css variable to change the width but it also doesn’t work
ion-alert{ --width: 400px; }
Posts: 4
Participants: 2
Ionic 5 - ion-select close popover from code
@Exers wrote:
What I’m trying to achieve is to have ion-select with ion-select-options in it, but I don’t want popover to show once I click on it… Is there a way to achieve this? Is this even possible to do? - I would guess there’s something like interface=“none”? Or maybe this can be done by css? I know it a weird thing to do but I need such a feature…Thanks in advance.
Posts: 2
Participants: 2
Disable the native "speech to text"
@yairu wrote:
hi,
there is way(ionic api) to get rid or disable the native “speech to text” (microphone icon) in the keyboard on ios/android ?thanks
Posts: 1
Participants: 1