Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all 48979 articles
Browse latest View live

Android App on ChromeOS - reloads on resize?

$
0
0

@mlynch wrote:

I’ve been developing an Android & iOS app for several months now, and it’s been working as expected. When the user rotates their device, the app rotates and resizes things appropriately.

But recently I installed my app on a Chromebook that supports native Android apps, because we expect some users will want a physical keyboard. The app loads and works just like it does on an Android tablet, except for the fact that changing the app from fullscreen to a windowed view reloads the page. My app requires significant data entry from the user, and I don’t want that to be lost if they change how they view the app.

Why is Ionic reloading on resize?

How do I prevent that from happening?

Posts: 1

Participants: 1

Read full topic


Ion-radio checked is no work, set with ngModel

$
0
0

@basket wrote:

Default check is not work, when it is called with ngModel.

<ion-radio-group [(ngModel)]=“test”>
<ion-item>
<ion-label>A</ion-label>
<ion-radio value=“right” checked></ion-radio>
</ion-item>
<ion-item>
<ion-label>b</ion-label>
<ion-radio value=“left”></ion-radio>
</ion-item>
</ion-radio-group>

But It works fine, when remove ngModel.

<ion-radio-group [(ngModel)]=“test”>
<ion-item>
<ion-label>A</ion-label>
<ion-radio value=“right” checked></ion-radio>
</ion-item>
<ion-item>
<ion-label>b</ion-label>
<ion-radio value=“left”></ion-radio>
</ion-item>
</ion-radio-group>

Posts: 1

Participants: 1

Read full topic

Error when execute "ionic serve", Variables.scss, Android App

$
0
0

@irodriguez9863 wrote:

First at all thanks for any help or guie, i’m new in Ionic :sweat_smile:.

Envyroment
Ionic:

ionic (Ionic CLI) : 4.10.2 (C:\Windows\System32\node_modules\ioni
c)
Ionic Framework : @ionic/angular 4.0.1
@angular-devkit/build-angular : 0.12.4
@angular-devkit/schematics : 7.2.4
@angular/cli : 7.2.4
@ionic/angular-toolkit : 1.3.0

System:

NodeJS : v10.15.1 (C:\Program Files\nodejs\node.exe)
npm : 6.4.1
OS : Windows 7 64Bits

Steps for geting the error
1.- use the commad “ionic start Test tabs”, not bugs here.
2.- use the commad “cd Test” then “ionic seve”, here is where crash the app

Log:

C:\Code\test2>ionic serve

ng run app:serve --host=0.0.0.0 --port=8100
[ng] WARNING: This is a simple server for use in testing or debugging Angular ap
plications
[ng] locally. It hasn’t been reviewed for security issues.
[ng] Binding this server to an open connection can result in compromising your a
pplication or
[ng] computer. Using a different host than the one passed to the “–host” flag m
ight result in
[ng] websocket connection issues. You might need to use “–disableHostCheck” if
that’s the
[ng] case.

[INFO] Development server running!

   Local: http://localhost:8100
   External: http://192.168.235.51:8100

   Use Ctrl+C to quit this process

[INFO] Browser window opened to http://localhost:8100!

[ng] i ?wdm?: wait until bundle finished: /
[ng] Date: 2019-02-07T21:02:05.677Z
[ng] Hash: 3d2b18dad1f2b38372a2
[ng] Time: 18541ms
[ng] chunk {common} common.js, common.js.map (common) 18.5 kB [rendered]
[ng] chunk {main} main.js, main.js.map (main) 33.7 kB [initial] [rendered]
[ng] chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 237 kB [initia
l] [rendered]
[ng] chunk {runtime} runtime.js, runtime.js.map (runtime) 8.9 kB [entry] [render
ed]
[ng] chunk {styles} styles.js, styles.js.map (styles) 21 kB [initial] [rendered]

[ng] chunk {tab1-tab1-module} tab1-tab1-module.js, tab1-tab1-module.js.map (tab1
-tab1-module) 7.91 kB [rendered]
[ng] chunk {tab2-tab2-module} tab2-tab2-module.js, tab2-tab2-module.js.map (tab2
-tab2-module) 6.48 kB [rendered]
[ng] chunk {tab3-tab3-module} tab3-tab3-module.js, tab3-tab3-module.js.map (tab3
-tab3-module) 6.49 kB [rendered]
[ng] chunk {tabs-tabs-module} tabs-tabs-module.js, tabs-tabs-module.js.map (tabs
-tabs-module) 9.92 kB [rendered]
[ng] chunk {vendor} vendor.js, vendor.js.map (vendor) 4.34 MB [initial] [rendere
d]
[ng]
[ng] ERROR in ./src/theme/variables.scss (./node_modules/@angular-devkit/build-a
ngular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-lo
ader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref–14-3!./src/the
me/variables.scss)
[ng] Module build failed (from ./node_modules/postcss-loader/src/index.js):
[ng] BrowserslistError: Unknown browser query basedir=$(dirname "$(echo "$0" | sed -e 's. Maybe you are using old Browserslist or made typo in query.
[ng] at unknownQuery (C:\Code\test2\node_modules\browserslist\index.js:137:1
0)
[ng] at C:\Code\test2\node_modules\browserslist\index.js:217:11
[ng] at Array.reduce ()
[ng] at resolve (C:\Code\test2\node_modules\browserslist\index.js:158:18)
[ng] at browserslist (C:\Code\test2\node_modules\browserslist\index.js:278:1
6)
[ng] at Browsers.parse (C:\Code\test2\node_modules\autoprefixer\lib\browsers
.js:66:12)
[ng] at new Browsers (C:\Code\test2\node_modules\autoprefixer\lib\browsers.j
s:48:26)
[ng] at loadPrefixes (C:\Code\test2\node_modules\autoprefixer\lib\autoprefix
er.js:85:20)
[ng] at plugin (C:\Code\test2\node_modules\autoprefixer\lib\autoprefixer.js:
96:20)
[ng] at LazyResult.run (C:\Code\test2\node_modules\postcss\lib\lazy-result.j
s:295:14)
[ng] at LazyResult.asyncTick (C:\Code\test2\node_modules\postcss\lib\lazy-re
sult.js:208:26)
[ng] at LazyResult.asyncTick (C:\Code\test2\node_modules\postcss\lib\lazy-re
sult.js:221:14)
[ng] at C:\Code\test2\node_modules\postcss\lib\lazy-result.js:213:17
[ng] ERROR in ./src/app/tab1/tab1.page.scss
[ng] Module build failed (from ./node_modules/postcss-loader/src/index.js):
[ng] BrowserslistError: Unknown browser query basedir=$(dirname "$(echo "$0" | sed -e 's. Maybe you are using old Browserslist or made typo in query.
[ng] at unknownQuery (C:\Code\test2\node_modules\browserslist\index.js:137:1
0)
[ng] at C:\Code\test2\node_modules\browserslist\index.js:217:11
[ng] at Array.reduce ()
[ng] at resolve (C:\Code\test2\node_modules\browserslist\index.js:158:18)
[ng] at browserslist (C:\Code\test2\node_modules\browserslist\index.js:278:1
6)
[ng] at Browsers.parse (C:\Code\test2\node_modules\autoprefixer\lib\browsers
.js:66:12)
[ng] at new Browsers (C:\Code\test2\node_modules\autoprefixer\lib\browsers.j
s:48:26)
[ng] at loadPrefixes (C:\Code\test2\node_modules\autoprefixer\lib\autoprefix
er.js:85:20)
[ng] at plugin (C:\Code\test2\node_modules\autoprefixer\lib\autoprefixer.js:
96:20)
[ng] at LazyResult.run (C:\Code\test2\node_modules\postcss\lib\lazy-result.j
s:295:14)
[ng] at LazyResult.asyncTick (C:\Code\test2\node_modules\postcss\lib\lazy-re
sult.js:208:26)
[ng] at LazyResult.asyncTick (C:\Code\test2\node_modules\postcss\lib\lazy-re
sult.js:221:14)
[ng] at C:\Code\test2\node_modules\postcss\lib\lazy-result.js:213:17
[ng] ERROR in ./src/global.scss (./node_modules/@angular-devkit/build-angular/sr
c/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src?
?embedded!./node_modules/sass-loader/lib/loader.js??ref–14-3!./src/global.scss)

[ng] Module build failed (from ./node_modules/postcss-loader/src/index.js):
[ng] BrowserslistError: Unknown browser query basedir=$(dirname "$(echo "$0" | sed -e 's. Maybe you are using old Browserslist or made typo in query.
[ng] at unknownQuery (C:\Code\test2\node_modules\browserslist\index.js:137:1
0)
[ng] at C:\Code\test2\node_modules\browserslist\index.js:217:11
[ng] at Array.reduce ()
[ng] at resolve (C:\Code\test2\node_modules\browserslist\index.js:158:18)
[ng] at browserslist (C:\Code\test2\node_modules\browserslist\index.js:278:1
6)
[ng] at Browsers.parse (C:\Code\test2\node_modules\autoprefixer\lib\browsers
.js:66:12)
[ng] at new Browsers (C:\Code\test2\node_modules\autoprefixer\lib\browsers.j
s:48:26)
[ng] at loadPrefixes (C:\Code\test2\node_modules\autoprefixer\lib\autoprefix
er.js:85:20)
[ng] at plugin (C:\Code\test2\node_modules\autoprefixer\lib\autoprefixer.js:
96:20)
[ng] at LazyResult.run (C:\Code\test2\node_modules\postcss\lib\lazy-result.j
s:295:14)
[ng] at LazyResult.asyncTick (C:\Code\test2\node_modules\postcss\lib\lazy-re
sult.js:208:26)
[ng] at LazyResult.asyncTick (C:\Code\test2\node_modules\postcss\lib\lazy-re
sult.js:221:14)
[ng] at C:\Code\test2\node_modules\postcss\lib\lazy-result.js:213:17
[ng] ERROR in ./src/app/tabs/tabs.page.scss
[ng] Module build failed (from ./node_modules/postcss-loader/src/index.js):
[ng] BrowserslistError: Unknown browser query basedir=$(dirname "$(echo "$0" | sed -e 's. Maybe you are using old Browserslist or made typo in query.
[ng] at unknownQuery (C:\Code\test2\node_modules\browserslist\index.js:137:1
0)
[ng] at C:\Code\test2\node_modules\browserslist\index.js:217:11
[ng] at Array.reduce ()
[ng] at resolve (C:\Code\test2\node_modules\browserslist\index.js:158:18)
[ng] at browserslist (C:\Code\test2\node_modules\browserslist\index.js:278:1
6)
[ng] at Browsers.parse (C:\Code\test2\node_modules\autoprefixer\lib\browsers
.js:66:12)
[ng] at new Browsers (C:\Code\test2\node_modules\autoprefixer\lib\browsers.j
s:48:26)
[ng] at loadPrefixes (C:\Code\test2\node_modules\autoprefixer\lib\autoprefix
er.js:85:20)
[ng] at plugin (C:\Code\test2\node_modules\autoprefixer\lib\autoprefixer.js:
96:20)
[ng] at LazyResult.run (C:\Code\test2\node_modules\postcss\lib\lazy-result.j
s:295:14)
[ng] at LazyResult.asyncTick (C:\Code\test2\node_modules\postcss\lib\lazy-re
sult.js:208:26)
[ng] at LazyResult.asyncTick (C:\Code\test2\node_modules\postcss\lib\lazy-re
sult.js:221:14)
[ng] at C:\Code\test2\node_modules\postcss\lib\lazy-result.js:213:17
[ng] at process._tickCallback (internal/process/next_tick.js:68:7)
[ng] ERROR in ./src/app/tab2/tab2.page.scss
[ng] Module build failed (from ./node_modules/postcss-loader/src/index.js):
[ng] BrowserslistError: Unknown browser query basedir=$(dirname "$(echo "$0" | sed -e 's. Maybe you are using old Browserslist or made typo in query.
[ng] at unknownQuery (C:\Code\test2\node_modules\browserslist\index.js:137:1
0)
[ng] at C:\Code\test2\node_modules\browserslist\index.js:217:11
[ng] at Array.reduce ()
[ng] at resolve (C:\Code\test2\node_modules\browserslist\index.js:158:18)
[ng] at browserslist (C:\Code\test2\node_modules\browserslist\index.js:278:1
6)
[ng] at Browsers.parse (C:\Code\test2\node_modules\autoprefixer\lib\browsers
.js:66:12)
[ng] at new Browsers (C:\Code\test2\node_modules\autoprefixer\lib\browsers.j
s:48:26)
[ng] at loadPrefixes (C:\Code\test2\node_modules\autoprefixer\lib\autoprefix
er.js:85:20)
[ng] at plugin (C:\Code\test2\node_modules\autoprefixer\lib\autoprefixer.js:
96:20)
[ng] at LazyResult.run (C:\Code\test2\node_modules\postcss\lib\lazy-result.j
s:295:14)
[ng] at LazyResult.asyncTick (C:\Code\test2\node_modules\postcss\lib\lazy-re
sult.js:208:26)
[ng] at LazyResult.asyncTick (C:\Code\test2\node_modules\postcss\lib\lazy-re
sult.js:221:14)
[ng] at C:\Code\test2\node_modules\postcss\lib\lazy-result.js:213:17
[ng] at process._tickCallback (internal/process/next_tick.js:68:7)
[ng] ERROR in ./src/app/tab3/tab3.page.scss
[ng] Module build failed (from ./node_modules/postcss-loader/src/index.js):
[ng] BrowserslistError: Unknown browser query basedir=$(dirname "$(echo "$0" | sed -e 's. Maybe you are using old Browserslist or made typo in query.
[ng] at unknownQuery (C:\Code\test2\node_modules\browserslist\index.js:137:1
0)
[ng] at C:\Code\test2\node_modules\browserslist\index.js:217:11
[ng] at Array.reduce ()
[ng] at resolve (C:\Code\test2\node_modules\browserslist\index.js:158:18)
[ng] at browserslist (C:\Code\test2\node_modules\browserslist\index.js:278:1
6)
[ng] at Browsers.parse (C:\Code\test2\node_modules\autoprefixer\lib\browsers
.js:66:12)
[ng] at new Browsers (C:\Code\test2\node_modules\autoprefixer\lib\browsers.j
s:48:26)
[ng] at loadPrefixes (C:\Code\test2\node_modules\autoprefixer\lib\autoprefix
er.js:85:20)
[ng] at plugin (C:\Code\test2\node_modules\autoprefixer\lib\autoprefixer.js:
96:20)
[ng] at LazyResult.run (C:\Code\test2\node_modules\postcss\lib\lazy-result.j
s:295:14)
[ng] at LazyResult.asyncTick (C:\Code\test2\node_modules\postcss\lib\lazy-re
sult.js:208:26)
[ng] at LazyResult.asyncTick (C:\Code\test2\node_modules\postcss\lib\lazy-re
sult.js:221:14)
[ng] at C:\Code\test2\node_modules\postcss\lib\lazy-result.js:213:17
[ng] at process._tickCallback (internal/process/next_tick.js:68:7)
[ng] ERROR in ./ansi-html 1:0
[ng] Module parse failed: Unexpected character ‘#’ (1:0)
[ng] You may need an appropriate loader to handle this file type.
[ng] > #!/bin/sh
[ng] | basedir=(dirname "(echo “$0” | sed -e ‘s,\,/,g’)")
[ng] |
[ng] i ?wdm?: Failed to compile.

Posts: 1

Participants: 1

Read full topic

Paypal ionic v3

$
0
0

@mgaforever wrote:

Hello,
I can not implement the paypal payment in my app,
when I invoke the paypal function, the following error occurs
Object (…) is not a function
I have already changed the file json package.json the field
“@ ionic-native / paypal”: “5.0.0-alpha.3”,
and if I give the command “npm install”
the following error comes out to me
npm WARN @ ionic-native / paypal @ 5.0.0-alpha.3 requires a peer of @ ionic-native / core @ 5.0.0-alpha.3 but none is installed. You must install peer dependencies yourself.
thanks for any help

Posts: 1

Participants: 1

Read full topic

Typescript error during --pro --release command

$
0
0

@Yasirjani wrote:

typescript error
Type FifthPage in G:/ionic_apps/PrayerApp2/blank/src/pages/fifth/fifth.ts is part of the declarations of 2
modules: AppModule in G:/ionic_apps/PrayerApp2/blank/src/app/app.module.ts and FifthPageModule in
G:/ionic_apps/PrayerApp2/blank/src/pages/fifth/fifth.module.ts! Please consider moving FifthPage in
G:/ionic_apps/PrayerApp2/blank/src/pages/fifth/fifth.ts to a higher module that imports AppModule in
G:/ionic_apps/PrayerApp2/blank/src/app/app.module.ts and FifthPageModule in
G:/ionic_apps/PrayerApp2/blank/src/pages/fifth/fifth.module.ts. You can also create a new NgModule that
exports and includes FifthPage in G:/ionic_apps/PrayerApp2/blank/src/pages/fifth/fifth.ts then import that
NgModule in AppModule in G:/ionic_apps/PrayerApp2/blank/src/app/app.module.ts and FifthPageModule in
G:/ionic_apps/PrayerApp2/blank/src/pages/fifth/fifth.module.ts.

Error: The Angular AoT build failed. See the issues above


Hi, I have the above problem when I try to run command
“ionic cordova build android --prod --release”

Please help me. Thanks

Posts: 1

Participants: 1

Read full topic

Weirdest code ever

$
0
0

@jfan29 wrote:

I’m trying to replace the location strategy by condition prod/dev

I console.log(IonicENV.mode) <= this loges true

 { provide: LocationStrategy, useClass: (IonicENV.mode == "prod") ? PathLocationStrateg HashLocationStrategy }

Although IonicEnv.mode returns prod, so the condition is true. but it always goes into using HashlocationStrategy.
There is no logical explanation at all…

if I do

      { provide: LocationStrategy, useClass: (console.log(IonicENV.mode == "prod")) ? PathLocationStrategy : HashLocationStrategy }

Then everything works correctly on the server. it meets the true condition and goes into using pathLocationStrategy… Any explanations…anyone??

Posts: 2

Participants: 1

Read full topic

Ionic CLI stopped working - TypeError: Right-hand side of 'instanceof' is not an object⏎

$
0
0

@iScott wrote:

Anyone else running into this?
It was working fine the other day. I haven’t changed/updated/touched node or ionic, or the project and now I went to run ionic serve and get the error:

TypeError: Right-hand side of ‘instanceof’ is not an object⏎

Anything I try to run gives the same error:
ionic
ionic -v

Any ideas?

Thanks.

Posts: 1

Participants: 1

Read full topic

Ionic 4 Store JSON Call for use in multiple pages

$
0
0

@Lona wrote:

Hi,

I’ve got a app, where I want to retrieve data from a server and use these values from multiple pages. Prefer only one http call.

How do I store the data? In a Service? But how?

Posts: 1

Participants: 1

Read full topic


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

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

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

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

Viewing all 48979 articles
Browse latest View live