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

Handle click event from class

$
0
0

@AdamGelineau wrote:

Hey guys,

I’m trying to open a Popover page, but it’s always showing at the middle of the screen. I think it’s because the button I click isn’t an ion component in the html file, but a Google maps marker in my ts file.

google.maps.event.addListener(friendMarker, 'click', (event) => {
    that.presentPopover(event, friendMarker, oneFriend)
});

So, I listen to the click event on my Maps marker, and when I click on it, I open my Popover page, just like this:

presentPopover(ev, friendMarker, oneFriend) {
    this.map.panTo(friendMarker.position);
    let popover = this.popoverCtrl.create(ContactPopoverPage, {friend: oneFriend});
    popover.present({
        ev: ev
    });
}

Unfortunately, I think my event isn’t the one the Popover page is waiting for… Because the popover just pop without the arrow and is always right in the middle of the screen.

So the question is : Do you guys know how to pass the right event to my Popover page from my ts file ?

Thanks mates !

Posts: 1

Participants: 1

Read full topic


Multiple routes with outlets named Ionic 4

$
0
0

@diolps wrote:

const routes: Routes = [
          {path: '', redirectTo: 'home', pathMatch: 'full'},
          {path: 'home', loadChildren: './home/home.module#HomePageModule',outlet:'primary'},
          {path: 'apple', loadChildren: './apple/apple.module#ApplePageModule', outlet: 'apple'},
          {path: 'banana', loadChildren: './banana/banana.module#BananaPageModule', outlet: 'banana'}
        ];

template:


     <ion-router-outlet main name = "primary"> </ ion-router-outlet>
      <ion-router-outlet name = "banana"> </ ion-router-outlet>
      <ion-router-outlet name = "apple"> </ ion-router-outlet>

I need to have each module loaded in a different outlet, I’ve researched it in several places but it seems that the issue https://github.com/ionic-team/ionic/issues/16619 that refers to this problem is closed but not I managed to solve using the version that supposedly would solve the problem of the ionic / angular .18 beta.

Does anyone have any examples of multiple routes with outlets named Ionic 4 or can you give me a light on why it does not recognize the outlets (banana and apple, it only renders the home) and neither does it change the routes?

Posts: 1

Participants: 1

Read full topic

Ion-fab-button frame issue

$
0
0

@irvingprog wrote:

Hi Everyone.

I’m experiencing an issue while using ion-fab-button and Angular’s [routerLink].

When I press the ion-fab-button on either Phone or browser i get an orange frame around.

image

  <ion-fab vertical="bottom" horizontal="end" slot="fixed">
    <ion-fab-button [routerLink]="['/test']">
      <ion-icon name="add"></ion-icon>
    </ion-fab-button>
  </ion-fab>

I could fix this by using (click) event instead of routerLink for going to another page.

Ionic:

   ionic (Ionic CLI)             : 4.10.2
   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.4.0

Cordova:

   cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
   Cordova Platforms     : android 7.1.4
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2ugin-ionic-webview 3.1.2, (and 9 other plugins).1.3, cordova-pl

System:

   NodeJS : v11.9.0
   npm    : 6.5.0
   OS     : Linux 4.15

Perhaps related: Rounded button click issue

Posts: 1

Participants: 1

Read full topic

Is not working build android (bad class file magic (cafebabe) or version)

$
0
0

@sysmodesenvolvimento wrote:

Hello guys.

I’m trying to generate an apk using the command:

ionic cordova build android

And is returning the following error:

:generateDebugAssets
:mergeDebugAssets

:transformClassesWithDexForDebug
Dex: Error converting bytecode to dex:
Cause: Dex cannot parse version 52 byte code.
This is caused by library dependencies that have been compiled using Java 8 or above.
If you are using the 'java' gradle plugin in a library submodule add
targetCompatibility = '1.7'
sourceCompatibility = '1.7'
to that submodule's build.gradle file.
    UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Exception parsing classes
        at com.android.dx.command.dexer.Main.processClass(Main.java:775)
        at com.android.dx.command.dexer.Main.processFileBytes(Main.java:741)
        at com.android.dx.command.dexer.Main.access$1200(Main.java:88)
        at com.android.dx.command.dexer.Main$FileBytesConsumer.processFileBytes(Main.java:1683)
        at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
        at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
        at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
        at com.android.dx.command.dexer.Main.processOne(Main.java:695)
        at com.android.dx.command.dexer.Main.processAllFiles(Main.java:592)
        at com.android.dx.command.dexer.Main.runMonoDex(Main.java:321)
        at com.android.dx.command.dexer.Main.run(Main.java:292)
        at com.android.builder.internal.compiler.DexWrapper.run(DexWrapper.java:54)
        at com.android.builder.core.DexByteCodeConverter.lambda$dexInProcess$0(DexByteCodeConverter.java:173)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000)
        at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:476)
        at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
        at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
        at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
        at com.android.dx.command.dexer.Main.parseClass(Main.java:787)
        at com.android.dx.command.dexer.Main.access$1600(Main.java:88)
        at com.android.dx.command.dexer.Main$ClassParserTask.call(Main.java:1722)
        at com.android.dx.command.dexer.Main.processClass(Main.java:773)
        ... 16 more

1 error; aborting

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Return code 1 for dex process

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
 FAILED

BUILD FAILED

Total time: 29.091 secs
Error: cmd: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Dex: Error converting bytecode to dex:
Cause: Dex cannot parse version 52 byte code.
This is caused by library dependencies that have been compiled using Java 8 or above.
If you are using the 'java' gradle plugin in a library submodule add
targetCompatibility = '1.7'
sourceCompatibility = '1.7'
to that submodule's build.gradle file.
    UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Exception parsing classes
        at com.android.dx.command.dexer.Main.processClass(Main.java:775)
        at com.android.dx.command.dexer.Main.processFileBytes(Main.java:741)
        at com.android.dx.command.dexer.Main.access$1200(Main.java:88)
        at com.android.dx.command.dexer.Main$FileBytesConsumer.processFileBytes(Main.java:1683)
        at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
        at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
        at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
        at com.android.dx.command.dexer.Main.processOne(Main.java:695)
        at com.android.dx.command.dexer.Main.processAllFiles(Main.java:592)
        at com.android.dx.command.dexer.Main.runMonoDex(Main.java:321)
        at com.android.dx.command.dexer.Main.run(Main.java:292)
        at com.android.builder.internal.compiler.DexWrapper.run(DexWrapper.java:54)
        at com.android.builder.core.DexByteCodeConverter.lambda$dexInProcess$0(DexByteCodeConverter.java:173)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: com.android.dx.cf.iface.ParseException: bad class file magic (cafebabe) or version (0034.0000)
        at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:476)
        at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
        at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
        at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
        at com.android.dx.command.dexer.Main.parseClass(Main.java:787)
        at com.android.dx.command.dexer.Main.access$1600(Main.java:88)
        at com.android.dx.command.dexer.Main$ClassParserTask.call(Main.java:1722)
        at com.android.dx.command.dexer.Main.processClass(Main.java:773)
        ... 16 more

1 error; aborting

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Return code 1 for dex process

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

[ERROR] An error occurred while running cordova build android (exit code 1).

I had already tried to update and downgrade in many versions the ionic, cordova, npm, gradle and dependencies of the project. Follow the ionic info:

$ ionic info

cli packages: (C:\Users\<user>\AppData\Roaming\npm\node_modules)

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

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.1.9
    Cordova Platforms  : android 6.3.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    Node              : v8.9.4
    npm               : 5.6.0
    OS                : Windows 10

Environment Variables:

    ANDROID_HOME : C:\Android\sdk

Misc:

    backend : pro

Posts: 1

Participants: 1

Read full topic

Access ionic 3 page outside

$
0
0

@flvrm92 wrote:

I am building an PWA application using Ionic 3 (without cordova plugin) and now i need to implement a recovery password feature. To do that i need to send an email to user with a link, when the user click in link i need to redirect him to a page with a token to recovery that password.

I have tried to implement this feature using IonPage segment, as you can see below.

@IonicPage({
  segment: 'token/:token'  
})

Calling the follow Url http://localhost:8100/#/token/mytoken i’m redirect to root page (login)

How can i do that ?

Posts: 1

Participants: 1

Read full topic

Ion-select option - long text can't override .alert-radio-label

$
0
0

@BrentAshWilliams wrote:

Hello,

I currently have an ion-select with options that have fairly long text. The text does not wrap.

After looking at various posts I have tried putting the following within my app.scss:

.alert-md .alert-radio-label {
white-space: normal !important;
}

When I launch my app in chrome inspector and highlight the ion-select option (it is not wrapping) I see the following in chrome inspector for my main.css.

.alert-md .alert-radio-label {
overflow: hidden;
-webkit-box-flex: 1;
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
text-overflow: ellipsis;
white-space: nowrap;
color: initial;
padding: 13px 26px;
}

I can change the nowrap to normal in chrome inspector and the ion-select options wrap like I want.

Can someone help to properly override the .alert-md .alert-radio-label properties?

Thanks!

Posts: 2

Participants: 1

Read full topic

Numeric Form Input Limit for Max and calculate 2nd field with it

$
0
0

@egaldamez wrote:

Hello everyone, im having a issue with a form i have a field called “puntoscanje”, the user can modify this field entering a number, i need to check the number the user set after changes had done in the field and then calculate a 2nd field, im trying to do it with a function to set the value BUT, sometimes it work sometimes it dont.
For example:
If the max value is 170, and the user writes down 200 it verifies each number like this:
2>170
20>170
200>170 and it sets the value to 170.

BUT if i type on the input 170 first, and then another number like 1702 and so on. its not changing.

Page ts.

import { Component, OnInit } from '@angular/core';

import { Storage } from '@ionic/storage';
import { GetService } from '../../get.service';

@Component({
  selector: 'app-canjepuntos',
  templateUrl: './canjepuntos.page.html',
  styleUrls: ['./canjepuntos.page.scss'],
})
export class CanjepuntosPage implements OnInit {
  points: any;
  puntoscanje: any;
  descuento: any;
  pcanje: any;

  constructor(private storage: Storage,) { 
    this.storage.get('Puntos').then((val) => {
      this.points = parseInt(val);
      //console.log('Your Name is', val);
    });
   }

  myFunction() {
    console.log(this.puntoscanje);
    if( this.puntoscanje > this.points){
      this.puntoscanje = this.points;
    }
      var PuntosDescto = 10 ;
      var calculo = ( this.puntoscanje / PuntosDescto).toFixed(2);
      this.descuento = calculo;        
  }

  ngOnInit() {
  }

}

HTML

<ion-header>
  <ion-toolbar color="dark">
    <ion-buttons slot="start">
      <ion-menu-button></ion-menu-button>
    </ion-buttons>
    <ion-title>Canje de Puntos</ion-title>
  </ion-toolbar>
</ion-header>
 
<ion-content padding>
  <form  #form="ngForm" (ngSubmit)="register(form)">
    <ion-grid>
      <ion-row justify-content-center>
        <ion-col align-self-center>
          <div padding class="form-inputs">
            <ion-item  >
                <ion-label position="stacked" style="text-align: center;">Puntos Acumulados</ion-label>
                <ion-input type="text" name="acumulados" [(ngModel)]="acumulados" value="{{points}}" readonly style="text-align: center;"></ion-input>
            </ion-item>

            <ion-item>
              <ion-label position="stacked" style="text-align: center;">Puntos a Canjear</ion-label>
              <ion-input type="number" inputmode="numeric" id="puntoscanje" name="puntoscanje" autofocus="true" [(ngModel)]="puntoscanje" style="text-align: center;" min="0" max="{{points}}" (ionChange)="myFunction()" ></ion-input>
            </ion-item>

            <ion-item>
              <ion-label position="stacked" style="text-align: center;">descuento</ion-label>
              <ion-input type="number" inputmode="numeric" id="descuento" name="descuento" [(ngModel)]="descuento" style="text-align: center;" max="{{points}}" ></ion-input>
            </ion-item>
            
            
          </div>
          <div style="padding-top:100px">
          <ion-button style="width:150px; height: 50px; margin: auto; " expand="block" (click)="Login()" >Canjear</ion-button>
          </div>
        </ion-col>
      </ion-row>
    </ion-grid>
    </form>
</ion-content>

And i need to set the value to Descuento field when the “puntoscanje” is set.
Im new to ionic but im trying my best.

Thanks in advance to everyone

Posts: 1

Participants: 1

Read full topic

Src and node_modules slip into prod build?

$
0
0

@morphist wrote:

Hey guys, I was checking our “prod” build for Ionic 3 built PWA today and noticed the following in the devtools:

issue1

Somehow src files and other node_modules content got into www folder that was built using ‘npm run build --prod’ command.

I double checked our package.json and tsconfig.json and found nothing that would stand out:

So I wonder whats wrong and why would typescript make it into webpack built js files;/ ?

{
  "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "declaration": false,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "noUnusedParameters": false,
    "noUnusedLocals": false,
    "strict": false,
    "lib": [
      "dom",
      "es2015"
    ],
    "module": "es2015",
    "moduleResolution": "node",
    "sourceMap": true,
    "target": "es5",
    "baseUrl": "./src"
  },
  "include": [
    "src/**/*.ts"
  ],
  "exclude": [
    "node_modules"
  ],
  "compileOnSave": false,
  "atom": {
    "rewriteTsconfig": false
  }
}

Posts: 1

Participants: 1

Read full topic


Application error the connection to the server was unsuccessful help

$
0
0

@RiodaJS wrote:

Hi, I debug my app and can find that local fonts, .json translate and a image is loading after 35 seconds, how can i make that the app init without load this resources?

Posts: 1

Participants: 1

Read full topic

Native file transfer not saving files

Ionic 4 - Header going up

O npm install no ios dando erro

$
0
0

@ricardorick45 wrote:

veja o retorno quando eu corro sudo npm install:

Last login: Sat Mar 23 04:15:42 on console

MacBook-Air-de-Ricardo:~ ricardooliveira$ cd bilets

MacBook-Air-de-Ricardo:bilets ricardooliveira$ npm install

npm WARN checkPermissions Missing write access to /Users/ricardooliveira/bilets/node_modules

npm WARN checkPermissions Missing write access to /Users/ricardooliveira/bilets/node_modules/@ionic

npm WARN @ionic-native/barcode-scanner@4.20.0 requires a peer of @ionic-native/core@^4.11.0 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/barcode-scanner@4.20.0 requires a peer of rxjs@^5.5.11 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/core@4.10.0 requires a peer of rxjs@^5.0.1 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/firebase@4.10.0 requires a peer of rxjs@^5.0.1 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/http@5.2.0 requires a peer of rxjs@^6.3.0 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/http@5.2.0 requires a peer of @ionic-native/core@^5.1.0 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/in-app-browser@5.2.0 requires a peer of rxjs@^6.3.0 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/in-app-browser@5.2.0 requires a peer of @ionic-native/core@^5.1.0 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/insomnia@5.2.0 requires a peer of rxjs@^6.3.0 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/insomnia@5.2.0 requires a peer of @ionic-native/core@^5.1.0 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/navigation-bar@5.2.0 requires a peer of rxjs@^6.3.0 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/navigation-bar@5.2.0 requires a peer of @ionic-native/core@^5.1.0 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/qr-scanner@4.20.0 requires a peer of @ionic-native/core@^4.11.0 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/qr-scanner@4.20.0 requires a peer of rxjs@^5.5.11 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/splash-screen@4.9.1 requires a peer of rxjs@^5.0.1 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/status-bar@4.10.0 requires a peer of rxjs@^5.0.1 but none is installed. You must install peer dependencies yourself.

npm WARN ngx-clipboard@9.0.1 requires a peer of @angular/core@5.x but none is installed. You must install peer dependencies yourself.

npm WARN ngx-clipboard@9.0.1 requires a peer of @angular/common@5.x but none is installed. You must install peer dependencies yourself.

npm WARN ngx-clipboard@9.0.1 requires a peer of @angular/platform-browser@5.x but none is installed. You must install peer dependencies yourself.

npm ERR! path /Users/ricardooliveira/bilets/node_modules

npm ERR! code EACCES

npm ERR! errno -13

npm ERR! syscall access

npm ERR! Error: EACCES: permission denied, access ‘/Users/ricardooliveira/bilets/node_modules’

npm ERR! { [Error: EACCES: permission denied, access ‘/Users/ricardooliveira/bilets/node_modules’]

npm ERR! stack:

npm ERR! ‘Error: EACCES: permission denied, access ‘/Users/ricardooliveira/bilets/node_modules’’,

npm ERR! errno: -13,

npm ERR! code: ‘EACCES’,

npm ERR! syscall: ‘access’,

npm ERR! path: ‘/Users/ricardooliveira/bilets/node_modules’ }

npm ERR!

npm ERR! The operation was rejected by your operating system.

npm ERR! It is likely you do not have the permissions to access this file as the current user

npm ERR!

npm ERR! If you believe this might be a permissions issue, please double-check the

npm ERR! permissions of the file and its containing directories, or try running

npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:

npm ERR! /Users/ricardooliveira/.npm/_logs/2019-03-23T07_16_22_100Z-debug.log

MacBook-Air-de-Ricardo:bilets ricardooliveira$ sudo npm install

Password:

> fsevents@1.2.7 install /Users/ricardooliveira/bilets/node_modules/fsevents

> node install

node-pre-gyp WARN Using request for node-pre-gyp https download

node-pre-gyp WARN Pre-built binaries not installable for fsevents@1.2.7 and node@10.15.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)

node-pre-gyp WARN Hit error EACCES: permission denied, mkdir ‘/Users/ricardooliveira/bilets/node_modules/fsevents/lib’

gyp ERR! configure error

gyp ERR! stack Error: EACCES: permission denied, mkdir ‘/Users/ricardooliveira/bilets/node_modules/fsevents/build’

gyp ERR! System Darwin 17.7.0

gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “configure” “–fallback-to-build” “–module=/Users/ricardooliveira/bilets/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node” “–module_name=fse” “–module_path=/Users/ricardooliveira/bilets/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64” “–napi_version=3” “–node_abi_napi=napi”

gyp ERR! cwd /Users/ricardooliveira/bilets/node_modules/fsevents

gyp ERR! node -v v10.15.0

gyp ERR! node-gyp -v v3.8.0

gyp ERR! not ok

node-pre-gyp ERR! build error

node-pre-gyp ERR! stack Error: Failed to execute ‘/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/ricardooliveira/bilets/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/Users/ricardooliveira/bilets/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64 --napi_version=3 --node_abi_napi=napi’ (1)

node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/ricardooliveira/bilets/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)

node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)

node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:962:16)

node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)

node-pre-gyp ERR! System Darwin 17.7.0

node-pre-gyp ERR! command “/usr/local/bin/node” “/Users/ricardooliveira/bilets/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp” “install” “–fallback-to-build”

node-pre-gyp ERR! cwd /Users/ricardooliveira/bilets/node_modules/fsevents

node-pre-gyp ERR! node -v v10.15.0

node-pre-gyp ERR! node-pre-gyp -v v0.10.3

node-pre-gyp ERR! not ok

Failed to execute ‘/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/ricardooliveira/bilets/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/Users/ricardooliveira/bilets/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64 --napi_version=3 --node_abi_napi=napi’ (1)

> node-sass@4.11.0 install /Users/ricardooliveira/bilets/node_modules/node-sass

> node scripts/install.js

Unable to save binary /Users/ricardooliveira/bilets/node_modules/node-sass/vendor/darwin-x64-64 : { Error: EACCES: permission denied, mkdir ‘/Users/ricardooliveira/bilets/node_modules/node-sass/vendor’

at Object.mkdirSync (fs.js:753:3)

at sync (/Users/ricardooliveira/bilets/node_modules/mkdirp/index.js:71:13)

at Function.sync (/Users/ricardooliveira/bilets/node_modules/mkdirp/index.js:77:24)

at checkAndDownloadBinary (/Users/ricardooliveira/bilets/node_modules/node-sass/scripts/install.js:114:11)

at Object.<anonymous> (/Users/ricardooliveira/bilets/node_modules/node-sass/scripts/install.js:157:1)

at Module._compile (internal/modules/cjs/loader.js:689:30)

at Object.Module._extensions…js (internal/modules/cjs/loader.js:700:10)

at Module.load (internal/modules/cjs/loader.js:599:32)

at tryModuleLoad (internal/modules/cjs/loader.js:538:12)

at Function.Module._load (internal/modules/cjs/loader.js:530:3)

errno: -13,

syscall: ‘mkdir’,

code: ‘EACCES’,

path:

‘/Users/ricardooliveira/bilets/node_modules/node-sass/vendor’ }

> node-sass@4.11.0 postinstall /Users/ricardooliveira/bilets/node_modules/node-sass

> node scripts/build.js

Building: /usr/local/bin/node /Users/ricardooliveira/bilets/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=

gyp info it worked if it ends with ok

gyp verb cli [ ‘/usr/local/bin/node’,

gyp verb cli ‘/Users/ricardooliveira/bilets/node_modules/node-gyp/bin/node-gyp.js’,

gyp verb cli ‘rebuild’,

gyp verb cli ‘–verbose’,

gyp verb cli ‘–libsass_ext=’,

gyp verb cli ‘–libsass_cflags=’,

gyp verb cli ‘–libsass_ldflags=’,

gyp verb cli ‘–libsass_library=’ ]

gyp info using node-gyp@3.8.0

gyp info using node@10.15.0 | darwin | x64

gyp verb command rebuild

gyp verb command clean

gyp verb clean removing “build” directory

gyp verb command configure

gyp verb check python checking for Python executable “python2” in the PATH

gyp verb which failed Error: not found: python2

gyp verb which failed at getNotFoundError (/Users/ricardooliveira/bilets/node_modules/which/which.js:13:12)

gyp verb which failed at F (/Users/ricardooliveira/bilets/node_modules/which/which.js:68:19)

gyp verb which failed at E (/Users/ricardooliveira/bilets/node_modules/which/which.js:80:29)

gyp verb which failed at /Users/ricardooliveira/bilets/node_modules/which/which.js:89:16

gyp verb which failed at /Users/ricardooliveira/bilets/node_modules/isexe/index.js:42:5

gyp verb which failed at /Users/ricardooliveira/bilets/node_modules/isexe/mode.js:8:5

gyp verb which failed at FSReqWrap.oncomplete (fs.js:154:21)

gyp verb which failed python2 { Error: not found: python2

gyp verb which failed at getNotFoundError (/Users/ricardooliveira/bilets/node_modules/which/which.js:13:12)

gyp verb which failed at F (/Users/ricardooliveira/bilets/node_modules/which/which.js:68:19)

gyp verb which failed at E (/Users/ricardooliveira/bilets/node_modules/which/which.js:80:29)

gyp verb which failed at /Users/ricardooliveira/bilets/node_modules/which/which.js:89:16

gyp verb which failed at /Users/ricardooliveira/bilets/node_modules/isexe/index.js:42:5

gyp verb which failed at /Users/ricardooliveira/bilets/node_modules/isexe/mode.js:8:5

gyp verb which failed at FSReqWrap.oncomplete (fs.js:154:21)

gyp verb which failed stack:

gyp verb which failed ‘Error: not found: python2\n at getNotFoundError (/Users/ricardooliveira/bilets/node_modules/which/which.js:13:12)\n at F (/Users/ricardooliveira/bilets/node_modules/which/which.js:68:19)\n at E (/Users/ricardooliveira/bilets/node_modules/which/which.js:80:29)\n at /Users/ricardooliveira/bilets/node_modules/which/which.js:89:16\n at /Users/ricardooliveira/bilets/node_modules/isexe/index.js:42:5\n at /Users/ricardooliveira/bilets/node_modules/isexe/mode.js:8:5\n at FSReqWrap.oncomplete (fs.js:154:21)’,

gyp verb which failed code: ‘ENOENT’ }

gyp verb check python checking for Python executable “python” in the PATH

gyp verb which succeeded python /usr/bin/python

gyp verb check python version `/usr/bin/python -c "import sys; print "2.7.10

gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j

gyp verb get node dir no --target version specified, falling back to host node version: 10.15.0

gyp verb command install [ ‘10.15.0’ ]

gyp verb install input version string “10.15.0”

gyp verb install installing version: 10.15.0

gyp verb install --ensure was passed, so won’t reinstall if already installed

gyp verb install version is already installed, need to check “installVersion”

gyp verb got “installVersion” 9

gyp verb needs “installVersion” 9

gyp verb install version is good

gyp verb get node dir target node version installed: 10.15.0

gyp verb build dir attempting to create “build” dir: /Users/ricardooliveira/bilets/node_modules/node-sass/build

gyp ERR! configure error

gyp ERR! stack Error: EACCES: permission denied, mkdir ‘/Users/ricardooliveira/bilets/node_modules/node-sass/build’

gyp ERR! System Darwin 17.7.0

gyp ERR! command “/usr/local/bin/node” “/Users/ricardooliveira/bilets/node_modules/node-gyp/bin/node-gyp.js” “rebuild” “–verbose” “–libsass_ext=” “–libsass_cflags=” “–libsass_ldflags=” “–libsass_library=”

gyp ERR! cwd /Users/ricardooliveira/bilets/node_modules/node-sass

gyp ERR! node -v v10.15.0

gyp ERR! node-gyp -v v3.8.0

gyp ERR! not ok

Build failed with error code: 1

npm WARN @ionic-native/barcode-scanner@4.20.0 requires a peer of @ionic-native/core@^4.11.0 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/barcode-scanner@4.20.0 requires a peer of rxjs@^5.5.11 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/core@4.10.0 requires a peer of rxjs@^5.0.1 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/firebase@4.10.0 requires a peer of rxjs@^5.0.1 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/http@5.2.0 requires a peer of rxjs@^6.3.0 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/http@5.2.0 requires a peer of @ionic-native/core@^5.1.0 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/in-app-browser@5.2.0 requires a peer of rxjs@^6.3.0 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/in-app-browser@5.2.0 requires a peer of @ionic-native/core@^5.1.0 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/insomnia@5.2.0 requires a peer of rxjs@^6.3.0 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/insomnia@5.2.0 requires a peer of @ionic-native/core@^5.1.0 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/navigation-bar@5.2.0 requires a peer of rxjs@^6.3.0 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/navigation-bar@5.2.0 requires a peer of @ionic-native/core@^5.1.0 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/qr-scanner@4.20.0 requires a peer of @ionic-native/core@^4.11.0 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/qr-scanner@4.20.0 requires a peer of rxjs@^5.5.11 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/splash-screen@4.9.1 requires a peer of rxjs@^5.0.1 but none is installed. You must install peer dependencies yourself.

npm WARN @ionic-native/status-bar@4.10.0 requires a peer of rxjs@^5.0.1 but none is installed. You must install peer dependencies yourself.

npm WARN ngx-clipboard@9.0.1 requires a peer of @angular/core@5.x but none is installed. You must install peer dependencies yourself.

npm WARN ngx-clipboard@9.0.1 requires a peer of @angular/common@5.x but none is installed. You must install peer dependencies yourself.

npm WARN ngx-clipboard@9.0.1 requires a peer of @angular/platform-browser@5.x but none is installed. You must install peer dependencies yourself.

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents):

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 install: node install

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! node-sass@4.11.0 postinstall: node scripts/build.js

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the node-sass@4.11.0 postinstall script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

npm ERR! /Users/ricardooliveira/.npm/_logs/2019-03-23T07_17_00_623Z-debug.log

MacBook-Air-de-Ricardo:bilets ricardooliveira$

Posts: 1

Participants: 1

Read full topic

How can I put clickable span on alertcontroller's message

$
0
0

@pdj wrote:

Hello I have html span clickable which is shown as m in below.
I thought I would be work out well, but it cause error on developer log on chrome
saying WARNING: sanitizing HTML stripped some content (see http://g.co/ng/security#xss).

I imported { DomSanitizer } from ‘@angular/platform-browser’;
but nothing happened…
How can I implement span clickable inside of alertcontroller?

for(var i=0; i<this.dutylist[0].length; i++){
m+="<span (click)='haha()'>"+this.dutylist[0][i]+"</span>"+'<br><br>';
}
console.log("m is ");
console.log(m);
    var message = this.dutylist[0]
    let alert = this.alertCtrl.create({
      title: '등록된 휴무표시',
      message: m,
      buttons: [
        {
          text: '확인',
          handler: data => {
          }
        }
      ]
    });
    alert.present();

Posts: 1

Participants: 1

Read full topic

Ionic 4 Tab navigation params

$
0
0

@maxkoch wrote:

Hello Ionites.

I have the tab root page (CustomerRootTabPage) with 3 tabpages (CustomerDetailTab, CustomerContactsTabPage, CustomerActivitiesTabPage).

Wenn I pass the paramter customerId from StartPage to CustomerRootTabPage, the parameter customerId is accessible only on tab root page, but is not accessible on tabpages.

I need to access this parameter on tabpages. Please help me :frowning:

StartPage:

<ion-card-content [routerLink]="'/customer/' + customer.customerId" routerDirection="forward">

=========================================================================

app.routing.module

const routes: Routes = [
  { path: '', loadChildren: './dashboard/dashboard.module#DashboardPageModule' },
  { path: 'customer/:customerId', loadChildren: './customer-root-tab/customer-root-tab.module#CustomerRootTabPageModule' }}
]

=========================================================================

CustomerRootTabPageRoutingModule.ts

const routes: Routes = [
  {
    path: 'customer',
    component: CustomerRootTabPage, 
    children: [
      {
        path: 'customer-detail-tab',
        children: [
          {
            path: '',
            loadChildren: '../customer-tabs/customer-detail-tab/customer-detail-tab.module#CustomerDetailTabPageModule'
          }
        ]
      },
      {
        path: 'customer-contacts-tab',
        children: [
          {
            path: '',
            loadChildren: '../customer-tabs/customer-contacts-tab/customer-contacts-tab.module#CustomerContactsTabPageModule'
          }
        ]
      },
      {
        path: 'customer-activities-tab',
        children: [
          {
            path: '',
            loadChildren: '../customer-tabs/customer-activities-tab/customer-activities-tab.module#CustomerActivitiesTabPageModule'
          }
        ]
      },
      {
        path: '',
        redirectTo: '/customer-detail-tab',
        pathMatch: 'full'
      }
    ]
  },
  {
    path: '',
    redirectTo: 'customer/customer-detail-tab',
    pathMatch: 'full'
  }
];

@NgModule({
  imports: [
    RouterModule.forChild(routes)
  ],
  exports: [RouterModule]
})
export class CustomerRootTabPageRoutingModule {}

=========================================================================
With works fine: CustomerRootTabPage.ts

export class CustomerRootTabPage implements OnInit {

  constructor(private activatedRoute: ActivatedRoute) {}


  ngOnInit() {
    let customerId = this.activatedRoute.snapshot.paramMap.get('customerId');
    console.log("customerId" + customerId); **// customerId is ok**
  }

=========================================================================

With not : CustomerDetailTabPage.ts

ngOnInit() {

    let customerId = this.activatedRoute.snapshot.paramMap.get('customerId');
   console.log("customerId" + customerId); // **customerId null !!!!!**

Thnx

Posts: 1

Participants: 1

Read full topic

Ionic v3 build prod error {@angular/common/common - Function calls are not supported in decorators}

$
0
0

@8bhsolutions wrote:

I’m building an Ionic v3 app.

Everything compiles and tests fine. That is I have been able to build and serve and test via the browser and emulator.

I’m trying to build a prod release using ionic cordova build --prod --release. I am getting the following issue

Any help would be appreciated.

Posts: 1

Participants: 1

Read full topic


How to post associative array in ionic 3

$
0
0

@gokulanathan wrote:

When i try to post a data in associative array to rest api using ionic.
Only empty data receive in server side.
Is this method is correct or suggest any other method

    public login(credentials) {
   
    let apiUrl = this.urlService.apiUrl  + 'oauth/access_token';
    let headers = new Headers({'Content-Type' : 'application/x-www-form-urlencoded'});
    let options = new RequestOptions({
			headers: headers});
    
     var postcredn=new Array();

     postcredn['username'] = "karthik@w3cert.in";
     postcredn['password'] = "05550";
     postcredn['grant_type'] = "password";
     postcredn['client_id'] = "Outfit1548925669";
     postcredn['client_secret'] = "a10620c85033ab02b582d17716cda245";

 
    console.log('iii'+postcredn['username'] );
    
      return new Promise((resolve, reject) => {
          this.http.post(apiUrl, postcredn,  options)
         
           .subscribe(res => {
            resolve(JSON.parse(JSON.stringify(res)));
             console.log('json'+ JSON.stringify(postcredn));
        
           }, (err) => {
             reject(err);
   public login(credentials) {
   
    let apiUrl = this.urlService.apiUrl  + 'oauth/access_token';
    let headers = new Headers({'Content-Type' : 'application/x-www-form-urlencoded'});
    let options = new RequestOptions({
			headers: headers});
    
     var postcredn=new Array();

     postcredn['username'] = "karthik@abcde.in";
     postcredn['password'] = "05550";
     postcredn['grant_type'] = "password";
     postcredn['client_id'] = "Outfit1548669";
     postcredn['client_secret'] = "a10620c85033abd17716cda245";

 
    console.log('iii'+postcredn['username'] );
    
      return new Promise((resolve, reject) => {
          this.http.post(apiUrl, postcredn,  options)
         
           .subscribe(res => {
            resolve(JSON.parse(JSON.stringify(res)));
             console.log('json'+ JSON.stringify(postcredn));
        
           }, (err) => {
             reject(err);
             console.log(apiUrl);
           });
     });
    }
        
}           console.log(apiUrl);
           });
     });
    }
        
}

Thanks in advance

Posts: 1

Participants: 1

Read full topic

How to create a spring loader for a specific div location

Get name of selected data

$
0
0

@ImadEL wrote:

i have 2 pages, 1 page gives you a list of names and there address, the next page has to have the name of the selected name from the list in the title, like example you click from the list, address 1, then the title of the next page has to be address 1, this is what i already have =>

page 1 html

<ion-list>
  <ion-item *ngFor="let building of Buildings">
      Address: {{building.address}}, Name: {{building.name}}
    </ion-label>
  </ion-item>
</ion-list>

page 1 .ts

page 2

ion-header>
ion-toolbar>
ion-title> title selected building <title>
</ion-toolbar>
</ion-header>

page 2 .ts

Can someone Help me?
thanks in advance

Posts: 1

Participants: 1

Read full topic

Add image to firebase chat

$
0
0

@lunneyd wrote:

I have send message working but trying to do sending image the right way too. it opens up gallery but that’s about it anyone know how implement images like sendMessage function

sendMessage() {
    // alert(this.user);
    this.db.list('/chat').push({
      userName: this.FName,
      message: this.message
    }).then(() => {
      // alert(this.message);
      this.message = ''
      // alert(this.message);
    })
  }




  sendPicMsg() {
    let loader = this.loadingCtrl.create({
      content: 'Please wait'
    });
    loader.present();
    this.imgstore.picmsgstore().then((imgurl) => {
      loader.dismiss();
      this.chatservice.addnewmessage(imgurl).then(() => {
        this.message = '';
      })
    }).catch((err) => {
      alert(err);
      loader.dismiss();
    })
  }


}

Posts: 1

Participants: 1

Read full topic

Ionic 4- Cannot read property 'then' of undefined - Platform.ready()

$
0
0

@Kyrax80 wrote:

Hello,

In Ionic I am trying to use Platform.ready() but I am getting the following error:

ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'then' of undefined
TypeError: Cannot read property 'then' of undefined
    at TeamComponent.<anonymous> (team.component.ts:25)
    at step (tslib.es6.js:97)
    at Object.next (tslib.es6.js:78)
    at tslib.es6.js:71
    at new ZoneAwarePromise (zone.js:910)
    at Module.__awaiter (tslib.es6.js:67)
    at team.component.ts:24
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:391)
    at Object.onInvoke (core.js:17298)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:390)
    at resolvePromise (zone.js:831)
    at resolvePromise (zone.js:788)
    at zone.js:892
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)
    at Object.onInvokeTask (core.js:17289)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:422)
    at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:195)
    at drainMicroTaskQueue (zone.js:601)
    at ZoneTask.push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (zone.js:502)
    at invokeTask (zone.js:1744)
import { Component, OnInit } from '@angular/core';
import { EmailComposer } from '@ionic-native/email-composer/ngx';
import { NavController, Platform, ToastController } from '@ionic/angular';

@Component({
  selector: 'team',
  templateUrl: './team.component.html',
  styleUrls: ['./team.component.scss'],
})
export class TeamComponent implements OnInit {

  constructor(
    private email: EmailComposer,
    private nav: NavController,
    private platform: Platform,
    private toast: ToastController
  ) { }

  ngOnInit() {}

  public openEmailApp(email: string) {
    this.platform.ready().then(() => {
      this.email.isAvailable().then(async (available: boolean) =>{
        if (available) {
          this.email.open({
            to: email
          });
        } else {
          let toast: any = await this.toast.create();
          await toast.present();
        }
       });
    });
  }

However, if I do a console log like this, it works and gives me ‘dom’ string: console.log(await this.platform.ready())

Whats the issue?

Thanks

Posts: 1

Participants: 1

Read full topic

Viewing all 71531 articles
Browse latest View live


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