Quantcast
Channel: Ionic Forum - Latest topics
Viewing all 70904 articles
Browse latest View live

App.component.scss not working

$
0
0

@BrentAshWilliams wrote:

Hello,

I am in the process of porting a ionic 3 app to ionic 4.

I created a new project with the latest version of ionic:

Ionic:

   Ionic CLI                     : 5.2.6 (/Users/baw/.nvm/versions/node/v12.9.0/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.8.0
   @angular-devkit/build-angular : 0.801.3
   @angular-devkit/schematics    : 8.1.3
   @angular/cli                  : 8.1.3
   @ionic/angular-toolkit        : 2.0.0

Utility:

   cordova-res : not installed
   native-run  : not installed

System:

   NodeJS : v12.9.0 (/Users/baw/.nvm/versions/node/v12.9.0/bin/node)
   npm    : 6.10.2
   OS     : macOS Mojave

If I put the following into a page’s .scss it works correctly and sets the ion-content background color:

ion-content{
    --ion-background-color: var(--ion-color-dark);
}

If I move this from the page’s scss to the app.component.scss it no longer works.

I was hoping to set this globally for all of my pages instead of having to put it in each page’s .scss.

Any ideas as to what I am doing wrong?

Thanks

Posts: 2

Participants: 2

Read full topic


Update From Ionic - Ready For Volunteers!

$
0
0

@perry wrote:

Hey gang, thank you for your patience. We paused the translation project for a bit while we shipped some critical updates on other projects, but we’ve got some huge updates for all of you.

We’ve settled on Crowdin for our translation efforts. We believe it will be the best tool for making it easy for translators to keep things up to date. We’re still building out a mechanism for how to translate the API docs, but our guides and most of our docs site is ready for translating! You can see the translated docs at:
https://ionic-docs-l10n.herokuapp.com/docs/es
https://ionic-docs-l10n.herokuapp.com/docs/fr
https://ionic-docs-l10n.herokuapp.com/docs/pt
https://ionic-docs-l10n.herokuapp.com/docs/zh

As you can see, most of it is still English, so there’s lots of work to do!

When we have enough content, we’ll merge these in to master and make them the official docs and link to them at ionicframework.com/docs

Please feel free to ask questions here or email me directly. I want to make sure this process is as easy for you as possible.

Cheers,

Perry @ Ionic

Posts: 2

Participants: 1

Read full topic

Ionic 4 - "Header" Component with a select that reloads current page

$
0
0

@mtnoronha7 wrote:

I have a header component, like this one:

That I can select a key data on my app.
How can I reload current page after selecting a new value on that modal?

On all pages I have this event overwriten:

ionViewWillEnter , so I guess if we ‘re-load’ the page it will be enough to update the screen’s data.
How can I do that from inside the component?

Posts: 1

Participants: 1

Read full topic

Ionic camera doen´t work in production release

$
0
0

@mikemikemike wrote:

Hello!

I have an ionic app with integrated Camera and ImagePicker plugins.
Everything goes without troubles in a debug mode, but when I am uploading to the GooglePlay, the app doesnt ask for any permission before instalation, and then I just couldnt open the components that are in charge of those plugins.

Posts: 1

Participants: 1

Read full topic

InAppBrowser don't allow geolocation ! Help please :(

$
0
0

@Webixis wrote:

Hello,
I contact you because I have a problem with the development of a mobile application Cordova / Ionic. We have created a mobile application hosted on a web server.

Our application uses geolocation with a JS script and Google Maps API, from a browser such as Chrome, etc. on computer or phone everything works perfectly.

However when I try to create a cordova / ionic application with a loading of the application through the InAppBrowser plugin the geolocation functionality does not work anymore, no permission is requested from the user and I think the problem come from there.

I try to integrate the Ionic Location Accuracy plugin but it does not work either, no permission is required. I hope you can help me or give me a start to follow.

Thank you so much

Url of web application : https://www.libertuspwa.fr/
e-mail : mrlthugo@gmail.com
password : test

Posts: 1

Participants: 1

Read full topic

'ionic serve' gives an error - v4 - ionic 4

$
0
0

@aocii wrote:

Hi, I just created an Ionic v4 project and when I write ‘ionic serve’ command to the folder of the project in cmd i get this error

`C:\v4>ionic serve

ng run app:serve --host=localhost --port=8100
[ng] An unhandled exception occurred: Unknown browser query basedir=$(dirname "$(echo "$0" | sed -e 's. Maybe you are using old Browserslist or made typo in query.
[ng] See “C:\Users\win10\AppData\Local\Temp\ng-LPbrdk\angular-errors.log” for further details.

[ERROR] ng has unexpectedly closed (exit code 127).

    The Ionic CLI will exit. Please check any output above for error details.`

But Ionic1 projects are working normal. I uninstalled ionic and reinstalled, it did not change.

ionic -v 5.2.6
node -v v10.15.3
java version “1.8.0_221”

Posts: 1

Participants: 1

Read full topic

Why Modal constructor is always fired when Page constructor/ngOnInit only once ?

$
0
0

@dquintard wrote:

Hi there,
I want to show dynamic components with such like routes:
/mycomponent/myId/:myId

If this component is a modal, i can easily get param from constructor:
this.navParams.get(‘myId’);

But if this component is a normal page, i can get my param only at first call.
Next calls, constructor and ngOnInit are never fired.
I have to get param from ionViewWillEnter.

Is it the correct way ?
Modals and Pages don’t behave same way ?

Best regards

Posts: 1

Participants: 1

Read full topic

Problem whit Rest

$
0
0

@swisstemi wrote:

Hi guys i try learn Ionic, i want to call a Rest service on my server from ionic app (start it with ionic serve) and the response is this error:

i know that the problems are cors filter, but if i try to do the same request from postman the Rest work fine.
How can i solve this?
thank for your support.

Posts: 1

Participants: 1

Read full topic


Ionic icons website down?

Modal Controller dismiss function?

$
0
0

@geo3433 wrote:

I created a modal page according to the documentation: https://ionicframework.com/docs/api/modal

In particular, I import the modal controller with

import {ModalController} from 'ionic-angular';

declare it in the constructor’s arguments with

constructor(private modalCtrl: ModalController) 

and create the close modal function, which binds a back button, with:

  dismiss() {
    // using the injected ModalController this page
    // can "dismiss" itself and optionally pass back data
    this.modalCtrl.dismiss({
      'dismissed': true
    });
  }

The dismiss word is underlined and the message that appears is “Property ‘dismiss’ does not exist on type ‘ModalController’” . Did I miss something?

Posts: 3

Participants: 2

Read full topic

Ionic 4 - Documentation error "icon-only"?

$
0
0

@IonicGeoff wrote:

Trying to get an icon button to display without the button, the docs say that…

<ion-button>
  <ion-icon slot="icon-only" name="star"></ion-icon>
</ion-button>

…should do it, but it doesn’t!

Had to revert to …

<button ion-button>
  <ion-icon slot="icon-only" name="star"></ion-icon>
</button>

Posts: 2

Participants: 1

Read full topic

Ionic 4 - The clear button of ion-input remains gray

Multi langauge tool

$
0
0

@Gurutva wrote:

How can integrate a multi language tool on ionic 4 app. I know how to use ngx-translate multi language library. but I want to integrate a tool.

Posts: 1

Participants: 1

Read full topic

Ionic 4 general questions

$
0
0

@et3rnal wrote:

Hi,

I’m working on evaluation to decide if we should use ionic or not after I recommend it however I’m facing lots of issues so I have questions if anyone can help with any of them I would appreciate that.

How good is ionic for out of boundary UI, the out of box component are great but we need more so how flexible are they? can you point me to 3rd party ionic 4 components set?

The second question is kinda related to the first, our target is web and iPads, so not small screens and I’m finding it hard to make better use of the space of these big screens, so is IONIC my right choice for iPad/web (desktop) apps?

Finally, are the older component (aka ionic 3) working with the latest ionic? I can’t believe I can’t find an easy way to do form stepper yet!

thanks

Posts: 1

Participants: 1

Read full topic

How to use ionic.Platform in ionic3

$
0
0

@roy800227 wrote:

I am currently upgrading a project from ionic v1 to ionic v3, but I am having trouble. ionic.Platform cannot be used in ionic3. Can someone tell me how to solve this problem?

enable() {
			console.log("bts : enabling...");
			this.quitTalkingWDT();
			if (ionic.Platform.isIOS()) {
				console.log("bts : iOS...");
				return null;
			} else {
				console.log("bts : non-iOS...");
				return this.Ble.enable();
			}
		}

Posts: 2

Participants: 2

Read full topic


Where to store stuff?

$
0
0

@martin_m wrote:

I’m using Ionic 4 to build a PWA. It is supposed to work from the browser only (so far), but it will be used mostly on mobile devices. I’ve been using ionic storage so far and it works fine on the desktop browser and on the my android device. Not on iphones however. So I’m looking for a solution that would actually be cross-platform. Is there something I could use that works on android, ios and desktop browsers? To start - saving my access token.

Posts: 1

Participants: 1

Read full topic

Print data from app component to home component on console

$
0
0

@Harikag wrote:

Hi, I have app component and home Component . I have fcm.onNotification() in app component so on the notification received I need to send that notification message to home component and need to print in console, please help me.

Posts: 1

Participants: 1

Read full topic

Ionic 4 streamingmedia plugin not compatible with android 9

$
0
0

@apekshapatil wrote:

Streaming media plugin working with android 6, 7 and 8 but same app video is not working in android 9 . can some one like to help me . Thanks in advance

Posts: 1

Participants: 1

Read full topic

Ionic 4 How to set the default item-background?

$
0
0

@Dovel wrote:

I have to themes. The default light and a custom dark.

light:

--ion-item-background: #ffffff;

dark:

--ion-item-background: #1a1b1e;

The problem ist that this blocks the color of card.
If ion-item-background is set in :root or .dark of variables.scss, the color attribut of ion-card does not work correctly anymore.

e.g.

<ion-card color="danger">
  <ion-card-header>
    Hello World
  </ion-card-header>
</ion-card>

does not not work if the variable ion-item-background is set. In this case it looks like empty:

If I remove the variable I get this as expected and also wanted with the variable:

Why use the variable --ion-item-background?
Well, it looks better. I use --ion-background-color with light gray and want default color of items white.
I expected that the ion-item-background is a default color and should not dominate the color atttibute.

How to set the default color? Or is this a bug?

Ionic: 4.7.1

Posts: 1

Participants: 1

Read full topic

Ionic 4 Angular: first Tab of tabbed page doesn't get the parameter via ActivatedRoute

$
0
0

@Sapphire wrote:

Hi there,
I am using a tabbed page where I send an object via NavigationExtras. this works just fine.
And from there, I want to send the horseId to the tabs.
The HTML of the root tab page (horse-detail):

<ion-content>
  <ion-tabs>

    <ion-tab-bar slot="bottom" color="primary">
      <ion-tab-button tab="horse-size/{{horseId}}">
        <ion-label>Größen</ion-label>
      </ion-tab-button>
  
      <ion-tab-button tab="horse-food/{{horseId}}">
        <ion-label>Futter</ion-label>
      </ion-tab-button>
  
      <ion-tab-button tab="horse-health/{{horseId}}">
        <ion-label>Gesundheit</ion-label>
      </ion-tab-button>
    </ion-tab-bar>
  
  </ion-tabs>
</ion-content>

My routes in router module of the tab root page (horse-detail):

const routes: Routes = [
  {
    path: 'horse-detail',
    component: HorseDetailPage,
    children: [
      {
        path: 'horse-size',
        children: [
          {
            path: '',
            loadChildren: '../horse-size/horse-size.module#HorseSizePageModule'
          }
        ]
      },
      {
        path: 'horse-size/:horseId',
        children: [
          {
            path: '',
            loadChildren: '../horse-size/horse-size.module#HorseSizePageModule'
          }
        ]
      },
      {
        path: 'horse-food',
        children: [
          {
            path: '',
            loadChildren: '../horse-food/horse-food.module#HorseFoodPageModule'
          }
        ]
      },
      {
        path: 'horse-food/:horseId',
        children: [
          {
            path: '',
            loadChildren: '../horse-food/horse-food.module#HorseFoodPageModule'
          }
        ]
      },
      {
        path: 'horse-health',
        children: [
          {
            path: '',
            loadChildren: '../horse-health/horse-health.module#HorseHealthPageModule'
          }
        ]
      },
      {
        path: 'horse-health/:horseId',
        children: [
          {
            path: '',
            loadChildren: '../horse-health/horse-health.module#HorseHealthPageModule'
          }
        ]
      },
      {
        path: '',
        redirectTo: '/horse-detail/horse-size',
        pathMatch: 'full'
      }
    ]
  },
  {
    path: '',
    redirectTo: '/horse-detail/horse-size',
    pathMatch: 'full'
  }
];

and in the first tab .ts:

this.horseId = this.route.snapshot.params.horseId;

error message:

ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'horse-detail/horse-size'
Error: Cannot match any routes. URL Segment: 'horse-detail/horse-size'
    at ApplyRedirects.noMatchError (router.js:3387)
    at CatchSubscriber.selector (router.js:3376)
    at CatchSubscriber.error (catchError.js:29)
    at MapSubscriber._error (Subscriber.js:75)
    at MapSubscriber.error (Subscriber.js:55)
    at MapSubscriber._error (Subscriber.js:75)
    at MapSubscriber.error (Subscriber.js:55)
    at MapSubscriber._error (Subscriber.js:75)
    at MapSubscriber.error (Subscriber.js:55)
    at ThrowIfEmptySubscriber._error (Subscriber.js:75)
    at resolvePromise (zone-evergreen.js:797)
    at resolvePromise (zone-evergreen.js:754)
    at zone-evergreen.js:858
    at ZoneDelegate.invokeTask (zone-evergreen.js:391)
    at Object.onInvokeTask (core.js:34182)
    at ZoneDelegate.invokeTask (zone-evergreen.js:390)
    at Zone.runTask (zone-evergreen.js:168)
    at drainMicroTaskQueue (zone-evergreen.js:559)
    at ZoneTask.invokeTask [as invoke] (zone-evergreen.js:469)
    at invokeTask (zone-evergreen.js:1603)
defaultErrorLogger @ core.js:9110
handleError @ core.js:9162
next @ core.js:34915
schedulerFn @ core.js:31051
__tryOrUnsub @ Subscriber.js:183
next @ Subscriber.js:122
_next @ Subscriber.js:72
next @ Subscriber.js:49
next @ Subject.js:39
emit @ core.js:31013
(anonymous) @ core.js:34240
invoke @ zone-evergreen.js:359
run @ zone-evergreen.js:124
runOutsideAngular @ core.js:34127
onHandleError @ core.js:34237
handleError @ zone-evergreen.js:363
runGuarded @ zone-evergreen.js:137
api.microtaskDrainDone @ zone-evergreen.js:663
drainMicroTaskQueue @ zone-evergreen.js:566
invokeTask @ zone-evergreen.js:469
invokeTask @ zone-evergreen.js:1603
globalZoneAwareCallback @ zone-evergreen.js:1629

The second and third tab are recieving the id correctly via the activated Route. But not the first one.
am I missing something or is this a bug? :confused:

Posts: 1

Participants: 1

Read full topic

Viewing all 70904 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>