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

Thumbnails design help


Ionic 4: slow actionsheet on first load

$
0
0

@RobinH wrote:

Ionic 4: When using Alert, Actionsheet or an ion-select, the alert/actionsheet is always slow to load on the first load.

Subsequent uses of the controllers are fast as expected.

Is there a way to preload these components so that they are fast from the start, i.e. something equivalent to adding add them to entryComponents?

Posts: 1

Participants: 1

Read full topic

Scroling up in Ionic Chat style

$
0
0

@kfjiwani wrote:

I have run into this issue that I have not been able to get past.
I have an infinite scroll “top”. And my initial data loads bottom to top (chat-like). And I am pre-pending items (chat-like) using an array. I fetch 20 rows and as I users scroll up, I fetch 20 more from DB.
Issue: Every time I add items to the top of the array the scroll just jumps to the top, instead of remaining at the current position. This causes an unpleasant experience for users. I have implemented quite a few online solutions but none seem to work.
Any insights would be helpful. I am using ionic 4

Posts: 1

Participants: 1

Read full topic

Send form to firebase database realtime? problem with NgModel

$
0
0

@xsiavichay wrote:

https://forum.ionicframework.com/uploads/default/original/3X/c/a/ca41a0de0513032f48580c0c82aa4db0f50444b5.png

HTML:

<ion-item color=“dark”>

<ion-icon name=“contact” item-start color=“light”></ion-icon>

<ion-input type=“text” name = “name” placeholder=“nombre” color=“light” [(ngModel)]=“AddEventPage.event_name” [ngModelOptions]="{standalone: true}"></ion-input>

</ion-item>

<ion-item color=“dark”>

<ion-icon name=“person” item-start color=“light”></ion-icon>

<ion-input type=“text” placeholder=“organizador” [(ngModel)]=“AddEventPage.manager_name”></ion-input>

</ion-item>

TYPESCRIPT:
sendRegister() {
console.log(“SE DIO CLICK”);
let textInput = document.querySelector("#imageUser");
var registerRef = firebase.database().ref().child(“event_register”);
registerRef.push({
event_name: this.event_name, manager_name: this.manager_name,
category: this.category, hour: this.hour, ubication: this.ubication, date: this.date,
description: this.description, final_date: this.final_date, final_hour: this.final_hour,
value: this.value
//photoURL: textInput.value
});
}

Posts: 1

Participants: 1

Read full topic

IONIC BUG!? Ionic 4

$
0
0

@CreativeArtDesign wrote:

when using ngModel in the ion-segment tag checked does not work anymore? Is this a bug?
This is my example

    <ion-segment [(ngModel)]="prefs">
      <ion-segment-button value="athan" checked>
      <ion-icon name="camera"></ion-icon>
        Athan
      </ion-segment-button>
      <ion-segment-button value="city">
      <ion-icon name="map"></ion-icon>
        City
      </ion-segment-button>
      <ion-segment-button value="language">
      <ion-icon name="globe"></ion-icon>
        Language
      </ion-segment-button>
      <ion-segment-button value="gps">
      <ion-icon name="locate"></ion-icon>
        GPS
      </ion-segment-button>
    </ion-segment>


  <div [ngSwitch]="prefs">
    <ion-list *ngSwitchCase="'athan'">
      <ion-item>
        <h2>Athan</h2>
      </ion-item>
    </ion-list>

    <ion-list *ngSwitchCase="'city'">
      <ion-item>
        <h2>City</h2>
      </ion-item>
    </ion-list>

    <ion-list *ngSwitchCase="'language'">
      <ion-item>
        <h2>Language</h2>
      </ion-item>
    </ion-list>

    <ion-list *ngSwitchCase="'gps'">
      <ion-item>
        <h2>GPS</h2>
      </ion-item>
    </ion-list>
  </div>

Posts: 1

Participants: 1

Read full topic

Cannot find module "path to feature module" when lazy loading

$
0
0

@darrensapalo wrote:

Ionic Lazy Loading Error

I’m encountering the following stacktrace error when I’m trying to configure Lazy Loading:

Error: Uncaught (in promise): Error: Cannot find module 'pages/home/home.module'.
Error: Cannot find module 'pages/home/home.module'.
    at http://localhost:8100/build/main.js:10:9
    at t.invoke (http://localhost:8100/build/polyfills.js:3:14976)
    at Object.onInvoke (http://localhost:8100/build/vendor.js:5134:33)
    at t.invoke (http://localhost:8100/build/polyfills.js:3:14916)
    at r.run (http://localhost:8100/build/polyfills.js:3:10143)
    at http://localhost:8100/build/polyfills.js:3:20242
    at t.invokeTask (http://localhost:8100/build/polyfills.js:3:15660)
    at Object.onInvokeTask (http://localhost:8100/build/vendor.js:5125:33)
    at t.invokeTask (http://localhost:8100/build/polyfills.js:3:15581)
    at r.runTask (http://localhost:8100/build/polyfills.js:3:10834)
    at c (http://localhost:8100/build/polyfills.js:3:19752)
    at c (http://localhost:8100/build/polyfills.js:3:19461)
    at http://localhost:8100/build/polyfills.js:3:20233
    at t.invokeTask (http://localhost:8100/build/polyfills.js:3:15660)
    at Object.onInvokeTask (http://localhost:8100/build/vendor.js:5125:33)
    at t.invokeTask (http://localhost:8100/build/polyfills.js:3:15581)
    at r.runTask (http://localhost:8100/build/polyfills.js:3:10834)
    at o (http://localhost:8100/build/polyfills.js:3:7894)

Configuration

Ionic Framework: 3.9.2
Ionic App Scripts: 3.2.1
Angular Core: 5.2.11
Angular Compiler CLI: 5.2.11
Node: 10.12.0
OS Platform: macOS
Navigator Platform: MacIntel
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36

Things to note

  • On my app/app.module.ts, I already don’t import the modules to be lazy-loaded.
  • On my app/app.component.ts, I use a string reference to my HomePage module.
  • On my app/app-routing.module.ts, The routes use loadChildren that references the filepath to my modules.
  • App module uses RouterModule.forRoot while Feature modules in the pages folder use RouterModule.forChild.

Not sure what else to do here, I followed the instructions for lazy-loading on the ionic documentation and I read through Angular documentation for lazy-loading.

Questions

  1. How do I fix the “cannot find module” error? I know the files are there but Ionic/Angular isn’t able to find where the module files are.

  2. Do I actually need to have external dependencies like angular-router-loader to enable angular to load modules from string-based file path references?

Github Repository

To reproduce the bug, please check out the repository below:

Posts: 1

Participants: 1

Read full topic

Reloading ion menu when a user log in

$
0
0

@ramashish wrote:

There is a {{user_name}} variable in my app. component.ts and want to use it for displaying user name which i am getting from local storage after the user log in .
But this loads only at app start and want to reload it after user log in . I cant under stand how to reload it .
cause when i close and reopen app after log in it works fine and user name displayed . but at first it shows only hi not showing user name.

<ion-menu [content]="content" >
        <ion-header>
          <ion-toolbar>
            <ion-title>
                <p>
                HI! {{user_name}}
            </p></ion-title>
          </ion-toolbar>
         
        </ion-header>
      
        <ion-content>
            
          <ion-list >
        
            <button menuClose ion-item *ngFor="let p of pages" (click)="openPage(p)">
              {{p.title}}
              
            </button>
            <button  menuClose ion-item (click)="logout()" >
              Log Out
            </button>
          </ion-list>
      
        </ion-content>
      
      </ion-menu>
      
      <!-- Disable swipe-to-go-back because it's poor UX to combine STGB with side menus -->
      <ion-nav [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>

Posts: 1

Participants: 1

Read full topic

Ionic sass can't download


Ionic3: ionic library

$
0
0

@rranjan306 wrote:

How to publish ionic3’s components, providers, directives to npm. I want to use the same components in every ionic project.

Posts: 1

Participants: 1

Read full topic

How can I user File opener OR Document Viewer Ionic Native plugins in Ionic-v3?

$
0
0

@karmdipjoshi wrote:

Hello I am trying the File Opener and Document Viewer plugins in Ionic-v4 and it’s worked fine but I implemented in Ionic-v3 it’s getting the TypeError.

I am sharing my config of Ionic and our system.

Ionic:

ionic (Ionic CLI) : 4.5.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.3
@ionic/app-scripts : 3.2.1

Cordova:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.4, ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 7 other plugins)

System:

Android SDK Tools : 26.1.1 (/Users/apple/Library/Android/sdk)
ios-deploy : 1.9.4
NodeJS : v10.14.1 (/usr/local/bin/node)
npm : 6.5.0
OS : macOS Mojave
Xcode : Xcode 10.1 Build version 10B61

And I am sharing the error is below:

 [Error] ERROR – TypeError: Object(__WEBPACK_IMPORTED_MODULE_1__ionic_native_core__["cordovaPropertyGet"]) is not a function. (In 'Object(__WEBPACK_IMPORTED_MODULE_1__ionic_native_core__["cordovaPropertyGet"])(this, "documentsDirectory")', 'Object(__WEBPACK_IMPORTED_MODULE_1__ionic_native_core__["cordovaPropertyGet"])' is an instance of Object)
TypeError: Object(__WEBPACK_IMPORTED_MODULE_1__ionic_native_core__["cordovaPropertyGet"]) is not a function. (In 'Object(__WEBPACK_IMPORTED_MODULE_1__ionic_native_core__["cordovaPropertyGet"])(this, "documentsDirectory")', 'Object(__WEBPACK_IMPORTED_MODULE_1__ionic_native_core__["cordovaPropertyGet"])' is an instance of Object)get — index.js:697downloadOpenPdf — home.ts:46(anonymous function)callWithDebugContext — core.js:15098dispatchEvent — core.js:10004(anonymous function) — platform-browser.js:2628onInvokeTask — core.js:4751runTask — polyfills.js:3:10845invokeTask — polyfills.js:3:16802p — polyfills.js:2:27655v — polyfills.js:2:27895
	error
	View_HomePage_0 (HomePage.ngfactory.js:25)
	logError (vendor.js:15363)
	(anonymous function)
	handleError (vendor.js:1835)
	handleError (vendor.js:122728)
	dispatchEvent (vendor.js:10333)
	(anonymous function) (vendor.js:39445)
	onInvokeTask (vendor.js:5076)
	runTask (polyfills.js:3:10845)
	invokeTask (polyfills.js:3:16802)
	p (polyfills.js:2:27655)
	v (polyfills.js:2:27895)

So What can I do for it?

Thanks in advance!

Regards,
Karmdip Joshi

Posts: 1

Participants: 1

Read full topic

Capacitor: variantOutput.getPackageLibrary

$
0
0

@Belas wrote:

Hi Ionities,

I’m getting the following ominous deprecation warning when building an Ionic/Angular/Capacitor app in Android Studio using ionic cap run android:

WARNING: API 'variantOutput.getPackageLibrary()' is obsolete and has been replaced with 'variant.getPackageLibraryProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variantOutput.getPackageLibrary(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.
Affected Modules: capacitor-android

Doesn’t affect the build, but just wanted to be sure you guys were aware of it.

Cheers,

Béla

Posts: 1

Participants: 1

Read full topic

Ionic 4 how to change placeholder color

$
0
0

@demokumar wrote:

Hello team,
how to change placeholder color and opacity of ion-select

.select-placeholder {
color: currentColor;
opacity: 1;
}

I try this but not work :confused:

Posts: 1

Participants: 1

Read full topic

Ionic 4 navitagion forward not working with named outlet

$
0
0

@laurineWermann wrote:

I am trying to implement some kind of navigation history using android back button, but I can’t get it to work with named outlets.

I do

this.navCtrl.navigateForward([{outlets: { masterNav: url}}]);

And the page displays well, but when I do

this.navCtrl.pop() 

It doesn’t get to previous page like if it was root.

What am I missing ?

Posts: 1

Participants: 1

Read full topic

Ios application development company

$
0
0

@kedgemor wrote:

Hello! I wanted to ask here, if possible, where I can find a supportive company or service that would help me and my team derive an application post-production support. If you can advise something, please be welcome. Thank you.

Posts: 1

Participants: 1

Read full topic

Ionic3 - onesignal won't work

$
0
0

@rotsix wrote:

Hi there,

I’m trying to implement push notifications using OneSignal, but couldn’t get it working.
When calling any method from OneSignal, it stops.

Here are some informations:

cli packages: (/usr/lib/node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1) 

local packages:

    @ionic/app-scripts : 3.1.1
    Cordova Platforms  : android 7.0.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Node : v11.9.0
    npm  : 6.7.0 
    OS   : Linux 4.20

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro

and the code:

import { OneSignal } from '@ionic-native/onesignal/ngx';
export class MyApp {
  constructor(platform: Platform, oneSignal: OneSignal) {
    platform.ready().then(() => {
      if (platform.is('cordova')) {
        oneSignal.setLogLevel({ logLevel: 6, visualLevel: 0 });
        oneSignal.startInit("foo", "bar");
        oneSignal.inFocusDisplaying(oneSignal.OSInFocusDisplayOption.InAppAlert);
        oneSignal.handleNotificationReceived().subscribe(notif => {
          // on notification received
        });
        oneSignal.handleNotificationOpened().subscribe(notif => {
          // on notification opened
        });
        oneSignal.endInit();
      } else {
        console.log("no push notifications");
      }
  });
}

When launching the app, here is the error using adb logcat (yes, not very verbose):

02-08 10:47:00.261 12654 12654 D SystemWebChromeClient: file:///android_asset/www/build/vendor.js: Line 1 : ERROR
02-08 10:47:00.261 12654 12654 I chromium: [INFO:CONSOLE(1)] "ERROR", source: file:///android_asset/www/build/vendor.js (1)

Anyone got an idea?

Thanks!

EDIT: sure, OneSignal is provided in app.module.ts

EDIT2: using some console.log between oneSignal’s calls shows that it stops on first call (here, setLogLevel), and same behavior when starting with startInit

Posts: 1

Participants: 1

Read full topic


Any way to auto send sms using ionic

$
0
0

@lunneyd wrote:

Is there any way to send am automatic sms using firebase cloud functions or something similiar.

Posts: 1

Participants: 1

Read full topic

Cannot read property 'serve:before' of undefined (CLI v2.2.3)

$
0
0

@darodi wrote:

im trying to serve a Moodle mobile app, this is the repo:

this is the log when i try - ionic serve, after clone the project and do - npm run setup :


TypeError: Cannot read property 'serve:before' of undefined
    at Object.runWithGulp (/usr/local/lib/node_modules/ionic/lib/cli.js:237:17)
    at Object.runr (/usr/local/lib/node_modules/ionic/lib/cli.js:194:18)
    at /usr/local/lib/node_modules/ionic/lib/cli.js:54:9
    at _fulfilled (/usr/local/lib/node_modules/ionic/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/usr/local/lib/node_modules/ionic/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/ionic/node_modules/q/q.js:749:13)
    at /usr/local/lib/node_modules/ionic/node_modules/q/q.js:557:44
    at flush (/usr/local/lib/node_modules/ionic/node_modules/q/q.js:108:17)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)


Cannot read property 'serve:before' of undefined (CLI v2.2.3)

Your system information:

Cordova CLI: 8.0.0 
Ionic Framework Version: 3.9.2
Ionic CLI Version: 2.2.3
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 3.1.9
ios-deploy version: Not installed
ios-sim version: 6.1.2 
OS: macOS
Node Version: v6.0.0
Xcode version: Xcode 10.1 Build version 10B61


Posts: 1

Participants: 1

Read full topic

No provider for UserService!

$
0
0

@Manel00 wrote:

Error: StaticInjectorError(AppModule)[UploaderPage -> UserService]: 
  StaticInjectorError(Platform: core)[UploaderPage -> UserService]: 
    NullInjectorError: No provider for UserService!

Hi everyone, im following this tutorial on youtube: https://www.youtube.com/playlist?list=PLYxzS__5yYQnpK36-GJjm7IEAuHR7IExa
But on #4 its giving me an error that i cannot figure out how to fix it, because it seems that everything is ok, but the problem is at the time to go to some page (register and login pages) it gives me the error “cannot get /page” and when i click on a “upload” tab it gives me the error from above… where is the place that i should take a look to make it works? thank you so much

Regards

Posts: 1

Participants: 1

Read full topic

Unexpected value 'IonicAcademyModule' imported by the module 'AppModule'. Please add a @NgModule annotation

$
0
0

@rranjan306 wrote:

I m importing ’ IonicAcademyModule ’ from my custom ionic module.

this is my app.module.ts file

import { IonicAcademyModule, AcademyProvider } from ‘ngx-lovelace-mobile-lib-common’;

@NgModule({
declarations: [
MyApp,
],
imports: [
BrowserModule,
IonicStorageModule.forRoot(),
RestangularModule.forRoot(RestangularConfigFactory),
AppCommonModule,
IonicAcademyModule,
IonicModule.forRoot(MyApp, {tabsPlacement: ‘top’}),
],
bootstrap: [IonicApp],
entryComponents: [
MyApp
],
providers: [
AcademyProvider
]
});

I m using lazy loading for my project.

You can see the repo for custom ionic module.

Posts: 1

Participants: 1

Read full topic

Backstacking problem ionic 3

$
0
0

@siddheshdeshpande47 wrote:

We are working on an app using ionic 3. We are facing the problem of stacking of pages in our app. Could some one tell how to remove this issue. If we open a page a single time then we can revert back to home page in a single time but if we open any page multiple times then we have to revert back the same number times to get back to home page.

Posts: 1

Participants: 1

Read full topic

Viewing all 70435 articles
Browse latest View live


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