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

IONIC 4 : getActiveIndex() is not working in ion-slides

$
0
0

@dvtopiya wrote:

Using IONIC 4 ion-slides, I am trying to get currently clicked silde index using getActiveIndex() as below which it is not working.

    <ion-slides #testSlider (ionSlideTap)="getIndex()">
       <ion-slide>....</ion-slide>
    </ion-slides>


    @ViewChild('testSlider') slider: ElementRef;  // first way
    
    getIndex() {
         this.slider.nativeElement.getActiveIndex();
    }


    @ViewChild('testSlider') slider: Slider; //second way
    
    getIndex() {
         this.slider.getActiveIndex();
    }

And the another way as below which is also not working:

    <ion-slides #testSlider (ionSlideTap)="getIndex(testSlider)">
     <ion-slide>....</ion-slide>
    </ion-slides>
    
    
    getIndex(testSlider) {
         testSlider.getActiveIndex();
    }

Can anyone please suggest me how can I get active index or currently clicked slide index in IONIC 4 ?

Posts: 1

Participants: 1

Read full topic


Ionic 4: "export 'List' was not found in '@ionic/angular'

$
0
0

@rizotas wrote:

Using @ionic/angular@4.0.0-rc.0, when I try to import list, as follow:

import { Platform, ToastController, List } from '@ionic/angular';

I get this buildtime error: [ng] "export ‘List’ was not found in ‘@ionic/angular’

Looking at ionic core It can see the exporting for List, but It can be used.

Is this a bug? How could I use the List?

Thanks

Posts: 1

Participants: 1

Read full topic

[ionic 4] Anybody has a working demo using ngx-translate and ionic 4.0.0-rc.0?

$
0
0

@gigocabrera wrote:

Anybody has a working demo using ngx-translate and ionic 4.0.0-rc.0? I’m not able to make it work. If anybody has a working demo/repo, I would greatly appreciate sharing it so I can learn. Thanks!!!

Posts: 1

Participants: 1

Read full topic

Ionic 3 View render error

Error run ionic cordova build ios --prod on mac

$
0
0

@BETOUBAM wrote:

Hey,
I need help when I launch this command ionic cordova build ios --prod.

I get this error:

cordova build ios --release
Discovered plugin “cordova-plugin-globalization” in config.xml. Adding it to the project
Plugin “org.apache.cordova.globalization” already installed on ios.
Discovered plugin “call-number” in config.xml. Adding it to the project
Plugin “mx.ferreyra.callnumber” already installed on ios.
Building project: /Users/…/…t/cityneed/platforms/ios/CityNeed.xcworkspace
Configuration: Release
Platform: device
User defaults from command line:
IDEArchivePathOverride = /Users/…/…/cityneed/platforms/ios/CityNeed.xcarchive

Build settings from command line:
CONFIGURATION_BUILD_DIR = /Users/…/…/cityneed/platforms/ios/build/device
SHARED_PRECOMPS_DIR = /Users/…/…/cityneed/platforms/ios/build/sharedpch

Build settings from configuration file ‘/Users/…/…/cityneed/platforms/ios/cordova/build-release.xcconfig’:
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES
CODE_SIGN_ENTITLEMENTS = (PROJECT_DIR)/(PROJECT_NAME)/Entitlements-(CONFIGURATION).plist CODE_SIGN_IDENTITY = iPhone Distribution ENABLE_BITCODE = NO HEADER_SEARCH_PATHS = "(TARGET_BUILD_DIR)/usr/local/lib/include" “(OBJROOT)/UninstalledProducts/include" "(OBJROOT)/UninstalledProducts/(PLATFORM_NAME)/include" "(BUILT_PRODUCTS_DIR)”
OTHER_LDFLAGS = -ObjC
SWIFT_OBJC_BRIDGING_HEADER = (PROJECT_DIR)/(PROJECT_NAME)/Bridging-Header.h

2019-01-04 16:06:56.210 xcodebuild[31795:872835] DTDeviceKit: deviceType from d2d1aa65acd26fe3c39a1b4e21d062321b8fa4f9 was NULL
2019-01-04 16:06:56.210 xcodebuild[31795:872835] DTDeviceKit: deviceType from d2d1aa65acd26fe3c39a1b4e21d062321b8fa4f9 was NULL
2019-01-04 16:06:56.211 xcodebuild[31795:872835] iPhoneSupport: :iphone:<DVTiOSDevice (0x7fe470b5b0e0), iPhone, iPhone,12.1.2 (16C101), 074986ac43ec97cad434d78d32efc6afa92d9fa3> unable to mount DeveloperDiskImage (Error Domain=com.apple.dtdevicekit Code=601 “Could not find platform” UserInfo={NSLocalizedDescription=Could not find platform})
2019-01-04 16:06:56.231 xcodebuild[31795:872827] [MT] DTDeviceKit: deviceType from d2d1aa65acd26fe3c39a1b4e21d062321b8fa4f9 was NULL
2019-01-04 16:06:56.249 xcodebuild[31795:872827] [MT] DTDeviceKit: deviceType from d2d1aa65acd26fe3c39a1b4e21d062321b8fa4f9 was NULL
2019-01-04 16:06:56.268 xcodebuild[31795:872827] [MT] DTDeviceKit: deviceType from d2d1aa65acd26fe3c39a1b4e21d062321b8fa4f9 was NULL
2019-01-04 16:06:56.285 xcodebuild[31795:872827] [MT] DTDeviceKit: deviceType from d2d1aa65acd26fe3c39a1b4e21d062321b8fa4f9 was NULL
2019-01-04 16:06:56.333 xcodebuild[31795:872827] [MT] DTDeviceKit: deviceType from d2d1aa65acd26fe3c39a1b4e21d062321b8fa4f9 was NULL
2019-01-04 16:06:56.351 xcodebuild[31795:872827] [MT] DTDeviceKit: deviceType from d2d1aa65acd26fe3c39a1b4e21d062321b8fa4f9 was NULL
2019-01-04 16:06:56.368 xcodebuild[31795:872827] [MT] DTDeviceKit: deviceType from d2d1aa65acd26fe3c39a1b4e21d062321b8fa4f9 was NULL
2019-01-04 16:06:56.386 xcodebuild[31795:872827] [MT] DTDeviceKit: deviceType from d2d1aa65acd26fe3c39a1b4e21d062321b8fa4f9 was NULL
error: archive not found at path ‘/Users/…/…/cityneed/platforms/ios/CityNeed.xcarchive’
** EXPORT FAILED **

CordovaError: Promise rejected with non-error: ‘Error code 65 for command: xcodebuild with args: -exportArchive,-archivePath,CityNeed.xcarchive,-exportOptionsPlist,/Users/…/…/cityneed/platforms/ios/exportOptions.plist,-exportPath,/Users/…/…/cityneed/platforms/ios/build/device’
at cli.catch.err (/usr/local/lib/node_modules/cordova/bin/cordova:30:15)
at process._tickCallback (internal/process/next_tick.js:68:7)
[ERROR] An error occurred while running subprocess cordova.

    cordova build ios --release exited with exit code 1.

    Re-running this command with the --verbose flag may provide more information.

MacBook-Pro:cityneed … $ cordova build ios --prod
Discovered plugin “cordova-plugin-globalization” in config.xml. Adding it to the project
Plugin “org.apache.cordova.globalization” already installed on ios.
Discovered plugin “call-number” in config.xml. Adding it to the project
Plugin “mx.ferreyra.callnumber” already installed on ios.
Building project: /Users/…/…/cityneed/platforms/ios/CityNeed.xcworkspace
Configuration: Debug
Platform: device
User defaults from command line:
IDEArchivePathOverride = /Users/…/…/cityneed/platforms/ios/CityNeed.xcarchive

Build settings from command line:
CONFIGURATION_BUILD_DIR = /Users/…/…/cityneed/platforms/ios/build/device
SHARED_PRECOMPS_DIR = /Users/…/…/cityneed/platforms/ios/build/sharedpch

Build settings from configuration file ‘/Users/…/…/platforms/ios/cordova/build-debug.xcconfig’:
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES
CODE_SIGN_ENTITLEMENTS = (PROJECT_DIR)/(PROJECT_NAME)/Entitlements-(CONFIGURATION).plist CODE_SIGN_IDENTITY = iPhone Developer ENABLE_BITCODE = NO GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1 HEADER_SEARCH_PATHS = "(TARGET_BUILD_DIR)/usr/local/lib/include" “(OBJROOT)/UninstalledProducts/include" "(OBJROOT)/UninstalledProducts/(PLATFORM_NAME)/include" "(BUILT_PRODUCTS_DIR)”
OTHER_LDFLAGS = -ObjC
SWIFT_OBJC_BRIDGING_HEADER = (PROJECT_DIR)/(PROJECT_NAME)/Bridging-Header.h

2019-01-04 16:13:57.358 xcodebuild[32032:881057] DTDeviceKit: deviceType from 074986ac43ec97cad434d78d32efc6afa92d9fa3 was NULL
error: archive not found at path ‘/Users/…/…/platforms/ios/CityNeed.xcarchive’
** EXPORT FAILED **

CordovaError: Promise rejected with non-error: ‘Error code 65 for command: xcodebuild with args: -exportArchive,-archivePath,CityNeed.xcarchive,-exportOptionsPlist,/Users/…/…/platforms/ios/exportOptions.plist,-exportPath,/Users/…/…/platforms/ios/build/device’
at cli.catch.err (/usr/local/lib/node_modules/cordova/bin/cordova:30:15)
at process._tickCallback (internal/process/next_tick.js:68:7)

It is my ionic info:

Ionic:

ionic (Ionic CLI) : 4.6.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.1.8

Cordova:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : ios 4.5.5
Cordova Plugins : cordova-plugin-ionic 2.0.4, cordova-plugin-ionic-webview 1.2.1, (and 23 other plugins)

System:

ios-deploy : 1.9.4
ios-sim : 7.0.0
NodeJS : v10.15.0 (/usr/local/bin/node)
npm : 6.4.1
OS : macOS Mojave
Xcode : Xcode 10.1 Build version 10B61

Posts: 1

Participants: 1

Read full topic

Segment with array - Ionic 3

$
0
0

@lucasdragos wrote:

hey guys how to do this filter ? When click on “Verdura” show only object with type “V” and when he click on “Fruta” show only the object with type “F”

this is my code .

html

  <div padding>
    <ion-segment  [(ngModel)]="arrProdutos">
      <ion-segment-button value="F">
        Fruta
      </ion-segment-button>
      <ion-segment-button value="V">
        Verdura
      </ion-segment-button>
      <ion-segment-button value="L">
        Legume
      </ion-segment-button>
    </ion-segment>
  </div>



<div [ngSwitch]="arrProdutos" *ngFor="let item of arrProdutos">
  <ion-list *ngSwitchCase="item.product.type" >
    <ion-card >
      <ion-card-content color="primary">
        <ion-grid>
          <ion-row>
            <ion-col align-self-start>
              <h3>Produto:</h3>
            </ion-col>

            <ion-col justify-content-end>
              <p align="right">{{ item.product.name}}</p>
            </ion-col>

          </ion-row>
</div>

my object

1. arrProdutos:
      product:
             type: "V "
             id: 276
             name: "SALSAO"
2. arrProdutos:
      product:
             type: "F "
             id: 278
             name: "ABOBORA"

Posts: 1

Participants: 1

Read full topic

Segment Filter using a object

$
0
0

@lucasdragos wrote:

I have an object with a category: type, and I need to list in my segment the items according to their type.

object: arrProduto

 1. produto:
      1. Type: "V "
      2. idProduto: 276
      3. name: "SALSAO"

  2. produto:
      1. Type: "F "
      2. idProduto: 290
      3. name: "ABOBORA"
<div padding>
    <ion-segment  [(ngModel)]="arrProdutos">
      <ion-segment-button value="F">
        Fruta
      </ion-segment-button>
      <ion-segment-button value="V">
        Verdura
      </ion-segment-button>
      <ion-segment-button value="L">
        Legume
      </ion-segment-button>
    </ion-segment>
  </div>

<div [ngSwitch]="arrProdutos" *ngFor="let item of arrProdutos">
  <ion-list *ngSwitchCase="item.type" >
    <ion-card >
      <ion-card-content color="primary">
        <ion-grid>
          <ion-row>
            <ion-col align-self-start>
              <h3>Produto:</h3>
            </ion-col>

            <ion-col justify-content-end>
              <p align="right">{{ item.name}}</p>
            </ion-col>

          </ion-row>
</div>

Posts: 1

Participants: 1

Read full topic

I have a problem with the clipboard plugin.

$
0
0

@craupesantez wrote:

Soy nuevo con ionico, he buscado el error en internet y todo lo que he encontrado no me ha servidor para solucionarlo.
cuando ejecuto el siguiente comando
“ionic cordova run android”
tengo el siguiente fallo

cordova run android
Android Studio project detected
Discovered plugin “com.verso.cordova.clipboard” in config.xml. Adding it to the project
Failed to restore plugin “com.verso.cordova.clipboard” from config.xml. You might need to try adding it again. Error: Failed to fetch plugin https://github.com/VersoSolutions/CordovaClipboard.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: cmd: Command failed with exit code 4294963238 Error output:
npm ERR! path C:\Users\craup\AppData\Roaming\npm-cache_cacache\tmp\git-clone-0c9ffb99\package.json
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open ‘C:\Users\craup\AppData\Roaming\npm-cache_cacache\tmp\git-clone-0c9ffb99\package.json’
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\craup\AppData\Roaming\npm-cache_logs\2019-01-04T21_46_54_904Z-debug.log
Discovered plugin “com.megster.cordova.FileChooser” in config.xml. Adding it to the project
Failed to restore plugin “com.megster.cordova.FileChooser” from config.xml. You might need to try adding it again. Error: Failed to fetch plugin http://github.com/don/cordova-filechooser.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: cmd: Command failed with exit code 4294963238 Error output:
npm ERR! path C:\Users\craup\AppData\Roaming\npm-cache_cacache\tmp\git-clone-e114d2f7\package.json
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open ‘C:\Users\craup\AppData\Roaming\npm-cache_cacache\tmp\git-clone-e114d2f7\package.json’
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

I have tried to install the clipboard plugin in several ways because it does not work for me.

cordova plugin add https://github.com/VersoSolutions/CordovaClipboard

when executing I get the following error:

Failed to fetch plugin https://github.com/VersoSolutions/CordovaClipboard via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name / version / URL.
Error: cmd: Command failed with exit code 4294963238 Error output:
npm ERR! path C: \ Users \ craup \ AppData \ Roaming \ npm-cache \ _cacache \ tmp \ git-clone-ca16e51c \ package.json

Posts: 1

Participants: 1

Read full topic


How to update timer component foreach value to each product using json api ?

$
0
0

@dileepyadav4it wrote:

**

I am making e-commerce countdown timer sale component. I made separate timer component and passing date and time for the end sale to child component using a @input decorator. this component working fine with one value. when I am using multiple values with JSON API using *ngFor=“let product of cat.products”. Then it’s not working for each product.

**

Timer component

use:

<ion-slide *ngFor="let product of cat.products">
<timerc [dt]="product.timeend"></timerc>
<ion-slide>

Json API

private data = [
    {
      category: 'Watches',
      expanded: true,
      products: [
        // tslint:disable-next-line:max-line-length
        { id: 0, name: 'fastrack fastrack', price: '250.00', rating: '4.5', timeend: 'Jan 6, 2019 14:50:25', img: '../../assets/items/cj-fastrack.jpeg' },
        // tslint:disable-next-line:max-line-length
        { id: 1, name: 'casio', price: '300.40', rating: '4.5', timeend: 'Jan 6, 2019 14:50:25', img: '../../assets/items/casio-original.jpeg' },
        // tslint:disable-next-line:max-line-length
        { id: 2, name: 'fastrack', price: '900.55', rating: '4.5', timeend: 'Jan 6, 2019 14:50:25', img: '../../assets/items/c-fastrack.jpeg' },
        // tslint:disable-next-line:max-line-length
        { id: 3, name: 'casio', price: '250.00', rating: '4.5', timeend: 'Jan 6, 2019 14:50:25', img: '../../assets/items/cj-fastrack.jpeg' },
        // tslint:disable-next-line:max-line-length
        { id: 4, name: 'Classic', price: '300.40', rating: '4.5', timeend: 'Jan 6, 2019 14:50:25', img: '../../assets/items/casio-original.jpeg' },
        // tslint:disable-next-line:max-line-length
        { id: 5, name: 'fastrack', price: '900.55', rating: '4.5', timeend: 'Jan 6, 2019 14:50:25', img: '../../assets/items/c-fastrack.jpeg' },
        // tslint:disable-next-line:max-line-length
        { id: 6, name: 'fastrack', price: '73.00', rating: '4.5', timeend: 'Jan 6, 2019 14:50:25', img: '../../assets/items/cj-fastrack.jpeg' }
      ]
    },
    {
      category: 'Smart TV / 4K',
      expanded: true,
      products: [
        { id: 7, name: 'Sony', price: '25000.00', rating: '4.5', timeend: 'Jan 6, 2019 14:50:25', img: '../../assets/items/an-original.jpeg' },
        { id: 8, name: 'MI', price: '30000.40', rating: '4.5', timeend: 'Jan 6, 2019 14:50:25', img: '../../assets/items/flipkart-40h.jpeg' },
        { id: 9, name: 'Samsung', price: '90000.55', rating: '4.5', timeend: 'Jan 6, 2019 14:50:25', img: '../../assets/items/flipkart-40h.jpeg' },
        { id: 10, name: 'Sony', price: '250.00', rating: '4.5', timeend: 'Jan 6, 2019 14:50:25', img: '../../assets/items/an-original.jpeg' },
        { id: 11, name: 'LG', price: '30622.40', rating: '4.5', timeend: 'Jan 6, 2019 14:50:25', img: '../../assets/items/flipkart-40h.jpeg' },
        { id: 12, name: 'Sony', price: '9000.55', rating: '4.5', timeend: 'Jan 6, 2019 14:50:25', img: '../../assets/items/flipkart-40h.jpeg' },
        { id: 13, name: 'Sony', price: '730000.00', rating: '4.5', timeend: 'Jan 6, 2019 14:50:25', img: '../../assets/items/an-original.jpeg' }
      ]
    },
    {
      category: 'Salad',
      expanded: true,
      products: [
        { id: 14, name: 'Ham & Egg', price: '8', rating: '4.5', timeend: 'Jan 6, 2019 14:50:25', img: '../../assets/items/iphone-6s.jpeg' },
        { id: 15, name: 'Basic', price: '5', rating: '4.5', timeend: 'Jan 6, 2019 14:50:25', img: '../../assets/items/iphone-6s.jpeg' },
        { id: 16, name: 'Ceaser', price: '9', rating: '4.5', timeend: 'Jan 6, 2019 14:50:25', img: '../../assets/items/iphone-6s.jpeg' }
      ]
    }
    ,
    {
      category: 'Salad',
      products: [
        { id: 17, name: 'Ham & Egg', price: '8', rating: '4.5', timeend: 'Jan 6, 2019 14:50:25', img: '../../assets/items/iphone-6s.jpeg' },
        { id: 18, name: 'Basic', price: '5', rating: '4.5', timeend: 'Jan 6, 2019 14:50:25', img: '../../assets/items/iphone-6s.jpeg' },
        { id: 19, name: 'Ceaser', price: '9', rating: '4.5', timeend: 'Jan 6, 2019 14:50:25', img: '../../assets/items/iphone-6s.jpeg' }
      ]
    }
    ,
    {
      category: 'Salad',
      products: [
        { id: 20, name: 'Ham & Egg', price: '8', rating: '4.5', timeend: 'Jan 6, 2019 14:50:25', img: '../../assets/items/iphone-6s.jpeg' },
        { id: 21, name: 'Basic', price: '5', rating: '4.5', timeend: 'Jan 6, 2019 14:50:25', img: '../../assets/items/iphone-6s.jpeg' },
        { id: 22, name: 'Ceaser', price: '9', rating: '4.5', timeend: 'Jan 6, 2019 14:50:25', img: '../../assets/items/iphone-6s.jpeg' }
      ]
    }
  ];

Posts: 1

Participants: 1

Read full topic

Disable vertical scroll of ion-slides

$
0
0

@shuaiwang wrote:

I am using ion-slides to create an image carousel. In my .css, I have ion-slides.slides { height: auto: } so that text will directly fall under the carousel.

How can I disable vertical scroll on ion-slides? This issue seems to exist on iOS only

Posts: 1

Participants: 1

Read full topic

Gradle based Broswer/iOS platform build

$
0
0

@tushhtrivedi wrote:

Hi All,

Can some one please guide me how to setup/create browser platform build using gradle?

If some one can share basic stater gradle script for the same than it will be great help.

Thanks,
Tusharkumar Trivedi

Posts: 1

Participants: 1

Read full topic

Ionic 4 Keyboard covers Content on iOS

$
0
0

@Diesel555 wrote:

Below is the HTML for the page. When I click on the bottom text box, the keyboard displays over the text box, not allowing it to be seen. Image below as well.

Is it because of the height of the new iOS keyboard? I added a new input below the three pictured and tried it on the simulator so it was way below the keyboard top. Still same issue.

<ion-header>
  <ion-toolbar color="primary">
    <ion-buttons slot="start"> <ion-back-button defaultHref="/tabs/account/"></ion-back-button> </ion-buttons>
    <ion-title><img src="assets/wp-toolbar.png"/></ion-title>
  </ion-toolbar>
</ion-header>

<ion-content padding>
  <ion-card>
    <ion-card-header> New Password </ion-card-header>
    <ion-card-content> Change the password for {{ username }}. </ion-card-content>
  </ion-card>
  <form [formGroup]="changePasswordForm" (ngSubmit)="changePassword()">
    <ion-item no-padding margin>
      <ion-label position="stacked">Current Password</ion-label>
      <ion-input formControlName="oldPassword" type="password"></ion-input>
    </ion-item>
    <ion-item no-padding margin>
      <ion-label position="stacked">New Password</ion-label>
      <ion-input formControlName="password" type="password"></ion-input>
    </ion-item>
    <ion-item no-padding margin>
      <ion-label position="stacked">Confirm New Password</ion-label>
      <ion-input formControlName="confirmPassword" type="password"></ion-input>
    </ion-item>
    <ion-button type="submit" [disabled]="!changePasswordForm.valid" margin>Reset</ion-button>
  </form>
</ion-content>

Posts: 1

Participants: 1

Read full topic

IONIC4 - get params from parent route

$
0
0

@haythoo wrote:

Hi,

I’m using ionic 4 RC.0.

I’m using tabs for my view, where I have a master page that include 3 tabs. the routing is like this

merchant-home >> merchant ID

  • tab 1
  • tab 2
  • tab 3

in the app-routing.module.ts I have this:

{ path: 'merchant-home/:id', loadChildren: './merchant-home/merchant-home.module#MerchantHomePageModule' },

in the merchant-home route I have this:

const routes: Routes = [
  {
    path: '',
    component: MerchantHomePage,
    children: [
      {
        path: `merchant-all`,
        // data: { i: 1, id: 456},
        children: [
          {
            path: '',
            loadChildren: '../merchant-all/merchant-all.module#MerchantAllPageModule'
          }
        ]
      },
      {
        path: 'merchant-discount',
        children: [
          {
            path: '',
            loadChildren: '../merchant-discount/merchant-discount.module#MerchantDiscountPageModule'
          }
        ]
      },
      {
        path: 'merchant-oneday',
        children: [
          {
            path: '',
            loadChildren: '../merchant-oneday/merchant-oneday.module#MerchantOnedayPageModule'
          }
        ]
      },
      {
        path: '',
        redirectTo: '/merchant-home/:id/merchant-all',
        pathMatch: 'full'
      }
    ]
  }
];


in merchant-home.page.ts i can get the id using :slight_smile:

this.route.snapshot.paramMap.get('id');

but on the tabs, i tried all tricks to get the ID without any luck!

console.log('the id', this.route.snapshot.paramMap.get('id')); 

this.route.params.subscribe(params => {

        const parentRouteId = +params['id'];
        console.log('parent params ', parentRouteId);
        console.log('parent params ', params);
    });

this.route.parent.data.subscribe((data) => console.log('para', data));

this.route.parent.snapshot.paramMap.get( 'id' )

 this.route.parent.paramMap.subscribe(
      ( params: ParamMap ): void => {

        console.log('the params', params);
      });


this.route.parent.params.subscribe(params => {

        console.log(params );
        // do something with local "params"
      });

 this.route.parent.params.subscribe(params => console.log(params)); 

      this.route.parent.queryParamMap.subscribe(params => console.log(params));

      console.log('the id', this.route.snapshot.parent.paramMap.get('id'));
      console.log('the id', this.route.parent.snapshot.paramMap.get('id'));

I just want to pass data to the tabs! I know navParams is not working anymore, and I don’t know what to use to pass the data!

the tabs setup is:

  <ion-tabs>
    <ion-tab-bar slot="bottom">
      <ion-tab-button tab="merchant-all" [rootParams]="merchantID">
        <ion-label>All {{merchantID}} </ion-label>
        <!-- <ion-icon name="star"></ion-icon> -->
      </ion-tab-button>

      <ion-tab-button tab="merchant-discount">
        <ion-label>Discount</ion-label>
        <!-- <ion-icon name="globe"></ion-icon> -->
      </ion-tab-button>

      <ion-tab-button tab="merchant-oneday">
        <ion-label>One Day</ion-label>
        <!-- <ion-icon name="logo-facebook"></ion-icon> -->
      </ion-tab-button>
    </ion-tab-bar>
  </ion-tabs>

Posts: 2

Participants: 1

Read full topic

Ionic 4.6.0 is not working: Zliberror

$
0
0

@israelysm wrote:

This is my error

C:\xampp\htdocs>ionic start myApp tabs --type=ionic-angular
√ Preparing directory .\myApp - done!
\ Downloading and extracting tabs starter (100.00%)
events.js:136
throw er; // Unhandled ‘error’ event
^

ZlibError: zlib: Cannot read property ‘length’ of null
at Unzip.Zlib.(anonymous function) (C:\Users\HP\AppData\Roaming\npm\node_modules\ionic\node_modules\minizlib\index.js:126:21)
at Unzip.write (C:\Users\HP\AppData\Roaming\npm\node_modules\ionic\node_modules\minizlib\index.js:247:21)
at Unzip.flush (C:\Users\HP\AppData\Roaming\npm\node_modules\ionic\node_modules\minizlib\index.js:206:10)
at Unzip.end (C:\Users\HP\AppData\Roaming\npm\node_modules\ionic\node_modules\minizlib\index.js:213:10)
at Unpack.end (C:\Users\HP\AppData\Roaming\npm\node_modules\ionic\node_modules\tar\lib\parse.js:416:21)
at IncomingMessage.onend (_stream_readable.js:598:10)
at Object.onceWrapper (events.js:254:19)
at IncomingMessage.emit (events.js:164:20)
at endReadableNT (_stream_readable.js:1054:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)

Posts: 1

Participants: 1

Read full topic

Conflict between geolocation and FCM

$
0
0

@trackurscoil wrote:

Hi,
I have a conflict between 2 plugins of google: gelocation and FCM,
The next warning appears when i navigate between pages: “failed to post notification on channel null…” although that the functionality of both is works,
If i chnage:
<preference name=“android-targetSdkVersion” value=“27” />
to:
<preference name=“android-targetSdkVersion” value=“25” />

the warning will disappeared but google play don’t want to confirm the version, because my previous version was with targetSdkVersion= 26 so they will not accept older version.

Anyone have an idea please?

Posts: 1

Participants: 1

Read full topic


Regarding moodle mobile app

$
0
0

@zshanthi wrote:

This is an ionic app

All works fine in android
But in ios I see a grey band about 1/2inch thick in the footer of iphone and ipad
What maybe the reason?
Also in an ionic framework exactly which files to edit for header and footer
In the above app where are the main header and footer templates?

Posts: 1

Participants: 1

Read full topic

CSS is not showing in Chrome after Ionic serve

$
0
0

@ayubIonicpro wrote:

Respected Ionic community,

I updated Node from 6 to Node 10 version and after update my each and every project got error of SASS so I searched about it and fixed it with this command npm rebuild node-sass --force .

Now when I do ionic serve then there is no css or classes in inspect and live reload also not working means I’ve to serve the app again to see changes. Strange thing is when I disconnect ionic serve then CSS appears.
Don’t know what’s happening Please help me out my development speed is effected by this problem.
Thanks

Posts: 1

Participants: 1

Read full topic

iOS ion-select action-sheet scrolling inertia

$
0
0

@alex87 wrote:

On Android the <ion-select> with the action-sheet interface has scrolling inertia making it nice and quick to flick through long lists. On ios however it only scrolls a few line with each swipe. How can I enable scrolling inertia on for iOS action-sheet?

Posts: 1

Participants: 1

Read full topic

Cannot build Ionic app with Firebase

$
0
0

@abdullahdawoud wrote:

Hi
I created ionic 3 app with firebase connection - using this tut: Building a Ionic Firebase App step by step

the application start correctly, and connected to firebase DB.and can perform CRUD operations.

when I deploy app using command

$ ionic cordova build --release android

I got error message:

No matching client found for package name 'io.ionic.starter'

note: the file ‘google-services.json’ is missing and my app is not shown inside Firebase console pic

I initialize firebase inside app module:

// Initialize Firebase
var config = {
  apiKey: "AIzaSyDGJaayYxyasdufYG7GKo36nUMdsfU",
  authDomain: "firedo-3997a.firebaseapp.com",
  databaseURL: "https://firedo-3997a.firebaseio.com",
  projectId: "firedo-3997a",
  storageBucket: "firedo-3997a.appspot.com",
  messagingSenderId: "578088897558"
};
firebase.initializeApp(config);

please help me deploying this app

Posts: 1

Participants: 1

Read full topic

Trying to Install PouchDB with Ionic 4 goes wrong

$
0
0

@helenakohan wrote:

Hi:

I’m trying to migrate from ionic 2 to 4 beta.

I use PouchDB heavily.

I tried to install PouchDB to the project but it gets me errors right of the install code of PouchDB. Just type in the CMD: (Node 11.6)

npm install pouchdb --save

Gets me error like this:
The Platform for project ‘leveldb.vcxproj’ is in
valid. Platform=‘x64’. You may be seeing this message because you are trying t
o build a project without a solution file, and have specified a non-default Pla
tform that doesn’t exist for this project.

Any solutions?

110X in advance

Posts: 1

Participants: 1

Read full topic

Viewing all 48983 articles
Browse latest View live


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