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

How to know if any option was Cheked

$
0
0

@marvinug wrote:

Good morning.
I have an object that returns a multiple values, inside the object comes a Boolean value, I must validate that at least one comes in cheked, I try to traverse the object but I throw a mistake that the name of the field I try to access does not exist.
Any way to access that value?

My code


validarDatos(){
  let cont = 0;
  console.log("tiposVehiculos");
  console.log(this.tiposVehiculos);
  for(let i = 0; i <= this.tiposVehiculos.length; i++) {
    if(this.tiposVehiculos[i].isChecked === true){
      cont++;
    }
  }
  console.log(cont);
}

my error

Posts: 1

Participants: 1

Read full topic


Error creating new project in ionic 4.1.2

$
0
0

@sitar16 wrote:

Suddenly … I get an error whenever creating a new project. Here is the error when i run the verbose flag:

[ERROR] An error occurred while running subprocess npm.

    npm i exited with exit code 1.
    
    Re-running this command with the --verbose flag may provide more 
    information.

ionic:cli-framework:utils:process onBeforeExit handler: process.exit received +0ms
ionic:cli-framework:utils:process onBeforeExit handler: running 1 queued functions +0ms
ionic:cli-framework:utils:process onBeforeExit handler: exiting (exit code 1) +20ms

My ionic info is:
Ionic:

ionic (Ionic CLI) : 4.1.2

System:

NodeJS : v8.11.3
npm : 6.4.1
OS : macOS High Sierra

It was all working fine a few days ago … I tried uninstalling and reinstalling ionic but nothing changes. Any help would be really appreciated

Posts: 1

Participants: 1

Read full topic

Another xml file add

Can not build ionic version 1 from Ionic Cli 4.1.2

$
0
0

@angelomrigo wrote:

Hi,

I have an old Ionic version 1 project, and a windows 7 machine wich was formatted.
After install Ionic Cli 4.1.2, i try to build this Ionic version 1, project but it gives me the error message:

Cannot run sass task: missing in gulpfile.js

Full error message:

ionic-v1 build
[15:26:57] Cannot load gulp: Error: Error in module: .\gulpfile.js:
Error: Cannot find module ‘internal/util/types’
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at evalmachine.:31:26
at Object. (C:\Users\myuser\myapp\node_modules\gulp\node_modules\vinyl-fs\node_modules\graceful-fs\fs.js:11:1)
at Module._compile (module.js:652:30)
at Object.Module._extensions…js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
[15:26:57] Cannot run sass task: missing in gulpfile.js

How can i compile the ionic version 1 project ?

Posts: 1

Participants: 1

Read full topic

Ionic 4 app not showing in dashboard

$
0
0

@smokd wrote:

I created an app following the directions here: https://dashboard.ionicframework.com/welcome
The first time I did, it asked me these questions:

  • Would you like to integrate your new app with Cordova to target native iOS and Android?
  • Install the free Ionic Pro SDK and connect your app?
  • Which app would you like to link?
  • Which git host would you like to use?
    The app then appeared on my dashboard.

Now it no longer asks me these questions and the app does not appear in the dashboard. Any ideas?

Let me know what info you need from me.

Posts: 1

Participants: 1

Read full topic

Ionic serve not working anymore

$
0
0

@smokd wrote:

I was able to successfully able to run the app in my browser using ionic serve -c, but i get the following error:

 ERROR in node_modules/@ionic/pro/dist/src/definitions.d.ts(1,23): error TS2688: Cannot find type definition file for 'cordova-plugin-ionic'.
[ng] node_modules/@ionic/pro/dist/src/definitions.d.ts(33,13): error TS2304: Cannot find name 'IDeployPluginAPI'.
[ng] node_modules/@ionic/pro/dist/src/definitions.d.ts(36,33): error TS2339: Property 'IonicCordova' does not exist on type 'Window'.
[ng] node_modules/@ionic/pro/dist/src/index.d.ts(1,23): error TS2688: Cannot find type definition file for 'cordova-plugin-ionic'.
[ng] node_modules/@ionic/pro/dist/src/index.d.ts(34,22): error TS2304: Cannot find name 'IDeployPluginAPI'.
[ng] node_modules/@ionic/pro/dist/src/index.d.ts(41,29): error TS2304: Cannot find name 'IDeployPluginAPI'.
[ng] node_modules/@ionic/pro/dist/src/index.d.ts(54,33): error TS2339: Property 'IonicCordova' does not exist on type 'Window'.
[ng] node_modules/ionic-angular/umd/components/input/input.d.ts(3,10): error TS2305: Module '"C:/Users/Mike/apps/smokd/node_modules/rxjs/Subject"' has no exported member 'Subject'.
[ng] node_modules/ionic-angular/umd/components/tabs/tabs.d.ts(2,10): error TS2305: Module '"C:/Users/Mike/apps/smokd/node_modules/rxjs/Subject"' has no exported member 'Subject'.
[ng] node_modules/rxjs/Subject.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Subject'.
[ng]
[ng] i 「wdm」: Failed to compile.

This started after I ran npm install

Does anyone have any ideas?

Posts: 1

Participants: 1

Read full topic

Ionic 3 legacy support?

$
0
0

@junerockwell wrote:

Will there be a support of Ionic 3 for years to come? At least 5 years?

Reason I’m asking is because Ionic 4 will be agnostic of base framework. While that is a great opportunity to use other frameworks such as Vue and React, there are a lot of projects using Angular as the base-framework.

It would be nice that for at least half a decade, Ionic 3 will be supported 100%.

Posts: 1

Participants: 1

Read full topic

Pb with ionic native contacts

$
0
0

@bomatch wrote:

Hello,
I try to use the plugin Ionic Native Contacts but I have a blank page after splashscreen.

I Installed this one :

$ ionic cordova plugin add cordova-plugin-contacts
$ npm install --save @ionic-native/contacts

After that on app.module.ts add :

import { Contacts, Contact, ContactField, ContactName } from ‘@ionic-native/contacts’;

and providers :

   Contacts,
   Contact,
   ContactField,
   ContactName,

and when I start application I have this one :

Can’t resolve all parameters for ContactField: (?, ?, ?).

Thank you very much for your help

Regards

Bomatch

Posts: 2

Participants: 2

Read full topic


Ionic 4 project has no routing?

$
0
0

@mlynch wrote:

I’m near pulling my hair out in frustration at this, and none of the documentation I can find has been helpful, so I’m asking anyone here for any help at all.

I created a new application in the Ionic 4 beta, using “ionic start [App-Name] blank”. Trying to use the Angular framework via “–type=angular” caused a ton of problems where the SQLite and File plugins I needed didn’t have the necessary “/ngx” folder, so they wouldn’t register as Providers and the app would just hang on a white screen.

But when I don’t use “–type=angular,” I can’t figure out routing capabilities. My app has no “app-routing.module.ts” file, or the folder for “node_modules/@angular/router” - there’s just nothing there.

All of the documentation I can find online assume that this file exists, but I don’t have one. So where do I start and how do I fix this?

Posts: 2

Participants: 2

Read full topic

How to disable scrollbars on ion-content in ionic 4?

$
0
0

@tlp-demodern wrote:

I want to get rid of the scrollbars in an ion-content but i dont see any way how to do it since it’s a div in the #shadow-root which cannot be styled from outside.
Also I didn’t find any css4 variable that would control the scrolling behaviour like ‘overflow’ f.e.

Thanks for any help

tlp

Posts: 1

Participants: 1

Read full topic

Ios 12 keyboard change window height (change css vh values(font, element height))

$
0
0

@bravo wrote:

cli packages: (/usr/local/lib/node_modules)

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

global packages:

cordova (Cordova CLI) : 8.0.0 

local packages:

@ionic/app-scripts : 3.1.11
Cordova Platforms  : ios 4.3.0
Ionic Framework    : ionic-angular 3.9.2

System:

ios-sim : 5.0.13 
Node    : v8.11.3
npm     : 6.1.0 
OS      : macOS High Sierra
Xcode   : Xcode 10.0 Build version 10A255 

Environment Variables:

ANDROID_HOME : /Volumes/TOURO/SDK

Misc:

backend : pro

all elements which has height or font-size or something else depend on height (css vh) change its size

Posts: 1

Participants: 1

Read full topic

How to project one observable to another?

$
0
0

@HassanKhademi wrote:

Hello folks,
I need to make an Observable<User[]> from an Observable<Transaction[]>.

Transaction and User classes look like:

export class Transaction {
  userId: string;
  // some other properties
}

export class User {
  userId: string;
  // some other properties
}

To get a User object for a given userId, I should use my UserService as following:

this.userService.getUser(userId)
  .subscribe(u => this.users = u);
}

Similarly I’ve got a TransactionService that gives me all the Transaction objects as an Observable<Transaction[]>

let transactionCandidates: Observable<Transaction[]> = this.transactionService.getTransactions();

What I need is to get is a list of all users that have done a transaction. For doing this I tried the following, but it doesn’t work. Can you please let me know what my mistakes are?

users: Observable<User[]>;
...
...
let transactionCandidates: Observable<Transaction[]> = this.transactionService.getTransactions();
this.users = transactionCandidates
   .map<Transaction[], User[]>(transactions => {
         let users: User[]; 
          transactions.forEach(transaction => {
             this.userService.getUser(transaction.userId)
                .subscribe(user => users.push(user));
          });
          return users;
     });

Ionic Framework: 3.9.2
Ionic App Scripts: 3.1.10
Angular Core: 5.2.11
Angular Compiler CLI: 5.2.11
Node: 8.11.1
OS Platform: Windows 7
Navigator Platform: Win32
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

Posts: 7

Participants: 2

Read full topic

Ionic native google maps : how to recreate maps when i change marker position

$
0
0

@elwanta wrote:

how to recreate maps when i change marker position? i try to change position of the marker when i change ion-select using ionChange action, but the maps not change.

please help me, thanks.

Posts: 1

Participants: 1

Read full topic

Ionic native google maps : how to connect 2 marker on map and count the distance

Missing routing preventing deeplinking from working

$
0
0

@bpeary wrote:

I’m trying to set up deeplinking and all the settings appear to be correct but I can’t get the links to navigate to the proper pages. I just get a white page.

While looking into that, I noticed that my app’s routing/navigation doesn’t show in the address bar. I have my app set up following these instructions https://ionicframework.com/docs/api/navigation/IonicPage/ and I have it working in test projects, but in this one it just says http://localhost:8001/index.html no matter what page I navigate too. Does anyone have any idea why this would happen?

Cheers

Posts: 1

Participants: 1

Read full topic


Chart not shown when modal is used

$
0
0

@jackcatch wrote:

I have implemented the highcharts in ionic3 app and calling it by its id .when it is loaded with the help of modal it doesnt not display .Any help will be appreciated

In mychart.ts file



          "chart": {
            "height": 300,
            "renderTo": "container",
            "plotBackgroundColor": null,
            "plotBackgroundImage": null,
            "plotBorderWidth": 0,
            "plotShadow": false,
            "backgroundColor": "white"
          },
          "credits": {
            "enabled": false
          },
          "tooltip": {
            "enabled": true
          },
          "subtitle": {
            "useHtml": true,
            "text": "<div style=\"font-size: 10vw; color:black;\">" + 50+ "</div><br>",
            "verticalAlign": "top",
            "y": 120,

          },
          "title": {
            "useHtml": true,
            "text": "<div style=\"font-size: 5vw; color:#c0c4c6\">wellbeing score<br></div>",
            "align": "center",
            "verticalAlign": "top",
            "y": 180,
          },

          "pane": {
            "center": ["50%", "47%"],
            "size": "78%",
            "startAngle": -90,
            "endAngle": 90,
            "background": {
              "borderWidth": 0,
              "backgroundColor": "transparent",
              "innerRadius": "95%",
              "outerRadius": "100%",
              "shape": "arc"
            }
          },
          "yAxis": [{
            "lineWidth": 0,
            "min": 0,
            "max": 100, /* Budget + Contingency */
            tickColor: 'white',
            tickWidth: 4,
            minorTickInterval: 1,
            minorTickLength: 6,
            minorTickPosition: 'inside',
            tickPixelInterval: 70,
            tickPosition: '',
            tickLength: 40,

            "labels": {
              "enabled": true,
              distance: 25,
              style: {
                color: '#50a2a7',
                font: '11px Trebuchet MS, Verdana, sans-serif'
              }
            },
            "title": {
              "text": "",
              "useHTML": false,
              "y": 80
            },
            "pane": 0
          }],
          "plotOptions": {
            "series": {
              "enableMouseTracking": false
            },
            "pie": {
              "dataLabels": {
                "enabled": true,
                "distance": 0,
                "style": {
                  "fontWeight": "bold",
                  "color": "white",
                  "textShadow": "0px 1px 2px black"
                }
              },
              "startAngle": -90,
              "endAngle": 90,
              "center": ["50%", "47%"]
            },
            "gauge": {
              "dataLabels": {
                "enabled": false
              },
              "pivot": {
                "radius": 25,
                "borderWidth": 1,
                "borderColor": "transparent",
                "backgroundColor": "white"
              },
              "dial": {
                "radius": "0%",
                "backgroundColor": "#00213d",
                "borderColor": "",
                "baseWidth": 0,
                "topWidth": 1,
                "baseLength": "10%",
                "rearLength": "10%"
              }
            }
          },

          "series": [{
            "type": "pie",
            "name": "Budget",
            "innerSize": "90%",
            "data": [{
              "y": 10, /* Paid as percentage */
              "name": "",
              color: "#ff5466"
            }, {
              "y": 10, /* Paid as percentage */
              "name": "",
              color: "#ff7a7d"
            }, {
              "y": 10, /* Paid as percentage */
              "name": "",
              color: "#ffca71"
            }, {
              "y": 10, /* Paid as percentage */
              "name": "",
              color: "#ffbf4e"
            }, {
              "y": 10, /* Remaining as percentage excluding paid */
              "name": "",
              color: "#e8e8e8"
            }, {
              "y": 10, /* Contingency as percentage */
              "name": "",
              color: "#e1e1e1"
            }]
          }, {
            "type": "gauge",
            "name": "Spent",
            "data": [50], /* Spent */
            /* Spent */
            "dial": {
              "rearLength": 0
            }
          }]
        });

mycharts.html

          <div id="container" ></div>

i’am calling mychart page through a modal by

    this.navCtrl.push(TabsPage,{index: "2"});

Posts: 1

Participants: 1

Read full topic

Ionic Slide is not jumping to particular slide

$
0
0

@sibabratswain wrote:

Hello .
In my ionic 3 project I Have my home page where I have several vertical slides . I want while page loads it should open a particular slide by its index number . I have used initialSlide property which sometimes working and sometimes does not .

How to fix this ?

newsfeed.html

 <ion-slides dir="{{dir}}" speed="300" initialSlide={{index_num}} direction="vertical" effect="flip"
              (ionSlideWillChange)="onSlideChangeStart($event)">
    <ion-slide *ngFor="let slide of rssDataArray" (swipe)="swipeEvent($event)">
      <div class="slide-image-div">
        <img [src]="slide.image ? slide.image : default_image" class="slide-image" (click)="tapOnHomePage(tap_status)">
      </div>
      <h2 (click)="saveToBookMarks()" class="slide-title" [innerHTML]="slide.title"
          [style.color]="bookmark_color_header"></h2>
      <p class="description" [innerHTML]="slide.description" (click)="tapOnHomePage(tap_status)"></p>
      <p class="tips">swipe left for more news</p>
    </ion-slide>
  </ion-slides>

Posts: 1

Participants: 1

Read full topic

Fresh Ionic Fails to Emulate iOS 12 - Info.plist file not found

$
0
0

@tolgactrlf5 wrote:

Hi,

Yesterday my mac got an update for iOS 12. I created a fresh ionic project with ionic start, builded successfully. When I try to emulate I got the error below:

[cordova] No target specified for emulator. Deploying to iPhone-XS-Max, 12.0 simulator
[cordova] /Applications/MAMP/htdocs/start/start/platforms/ios/build/emulator/start.app/Info.plist file not found.
[ERROR] An error occurred while running subprocess cordova.

My ionic info.

Ionic:

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

Cordova:

cordova (Cordova CLI) : 8.0.0
Cordova Platforms : ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.2, cordova-plugin-ionic-webview 2.1.4, (and 4 other plugins)

System:

Android SDK Tools : 26.1.1 (/Users/halilyumusak/Library/Android/sdk)
ios-deploy : 1.9.2
NodeJS : v8.11.1 (/usr/local/bin/node)
npm : 5.6.0
OS : macOS High Sierra
Xcode : Xcode 10.0 Build version 10A255

Posts: 1

Participants: 1

Read full topic

Provider, injectables: comprehension question

$
0
0

@Llarian wrote:

Hi,

I am a bit onfused about the scope of providers and/pr injectables;
I wanted to build a provider wrapping some often used stuff, like a confirmation dialog before deleting, which initializes the deletion when confirmed.

My code in the provider:

  constructor(public alertCtrl: AlertController) {  }

  ShowConfirmation(title, message, ok, okText, cancelText) {
    let confirm = this.alertCtrl.create({
      title: title,
      message: message,
      buttons: [
        {
          text: cancelText,
          role: 'cancel',
          handler: () => {
            // nothing
          }                
        },
        {
          text: okText,
          role: 'cancel',
          handler: () => {
            ok();
          }                
        }
      ]
    });
    confirm.present();
  }

the call:

    this.utils.ShowConfirmation("Delete", "Do you really want to delete this item?", this.deleteItem, "Delete", "Cancel");

the deleteItem()

  deleteItem() {
    let idx = this.items.findIndex(x => x.MD5 == this.key);
    if (idx != -1) {
      this.items.splice(idx, 1);
      this.Data.storage.set('myItems', JSON.stringify(this.items)).then(() => {
        this.refreshData();
      });
    }
  }

The error I get: Cannot read property ‘items’ of undefined
Okay, so the page from wher I call the method is not in the scope. Why? Amd how do I do this correctly? How do I get the correct scope in a provider?

thnx

Posts: 1

Participants: 1

Read full topic

Ionic latest add firebase

Viewing all 71019 articles
Browse latest View live


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