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

Ioniv View doesn't show me the real www directory content

$
0
0

@Djerem wrote:

Hi all,

I explain :

I’m trying to use Ionic View app to show my app to a customer. I processed like this :slight_smile:

. ionic link -> I choose my app id -> private and public keys are created and .git directory is created
. git push ionic master -> error :

error: src refspec master does not match any.
error: failed to push some refs to 'ssh://xxxxx.com/project.git'

So I try to create a new Ionic v1 project with a blank starter and I replace the new www directory with my app. Now git push works well but when I launch my app with Ionic View I have a blank starter :face_with_raised_eyebrow:

If I try with an other starter type it’s the same : I see the original www content, not the new one. I don’t understand.

Thank by advance for your help, and thank you to Ionic team for your great work !

Posts: 1

Participants: 1

Read full topic


Unselect event for ion-option

$
0
0

@abeerIbrahim wrote:

I’m trying to implement the select All in ion-select,
So I need to capture the select and unselect event for ion-option ,

I implemented the select all by using ionSelect event , but i’m still trying to implement unselect all:


<form  [formGroup]="addserviceForm">
<ion-select   formControlName='areacover' multiple="true">
<ion-option value="All" (ionSelect)="selectAll()" >select All </ion-option>
   <ion-option     *ngFor='let district of districtlist'   [value]="district.nameen">{{district.namear}} </ion-option>
  </ion-select>
</form>
selectAll(){
this.addserviceForm.get(‘areacover’).setValue(this.districtlisten);
}

Also , I need to load the select in option in full screen, I tried to set width as 100% but it doesn’t work.

Posts: 1

Participants: 1

Read full topic

Ionic2 native datePicker not working

$
0
0

@cosmincosmin wrote:

Hi,
I’m trying to use datePicker native component, I followed the exact instructions and yet it doesn’t work.
When I press the button that calls the code to show the datePicker nothing happens!
I tried it on emulator and on real phone as well.

app.module.ts
import { DatePicker } from '@ionic-native/date-picker';

providers: [
   ...
    DatePicker
  ]

my-class.ts
import { DatePicker } from '@ionic-native/date-picker';

  constructor(private datePicker: DatePicker) { }

  onDate() {
    this.datePicker.show({
      date: new Date(),
      mode: 'date',
      androidTheme: this.datePicker.ANDROID_THEMES.THEME_HOLO_DARK
    }).then(
      date => console.log('Got date: ', date),
      err => console.log('Error occurred while getting date: ', err)
      );
  }

Please help!

Posts: 1

Participants: 1

Read full topic

Ionic cordova resources Connect ETIMEDOUT

$
0
0

@Rasioc wrote:

I’m trying to generate an icon and splashscreen, but All I always get a timeout.

ionic cordova resources --icon
Generating platform resources: 24 / 25 complete - failed!
Error: connect ETIMEDOUT

Mostly it happens after 21-24 generated images, i tried like 20 times, always the same.
Is anybody able to use that service?

Posts: 1

Participants: 1

Read full topic

Modals close when clicking random button on page

$
0
0

@MaRoberge wrote:

Hi !

So I created a modal that returns data to my page by following the norms.
But in this modal, I have another button that has a function link to it. I don’t know why but when I click on it, it dismisses my modal. Even if I remove the (click) part of the button, it still dismiss it. The button triggers his function like it should, but it looks like the viewCtrl dismiss it for whatever reason.

Thank you,

I’m doing this with Ionic Lab FYI.

Posts: 1

Participants: 1

Read full topic

Application size is too big

Photoviewer is asking for permission

$
0
0

@synedrio wrote:

I’m using PhotoViewer (https://github.com/sarriaroman/photoviewer ) as a native plugin.

I have some photos saves in the assets, but when it tries to load them (i have it on click) it asks for permission : Allow to PROGRANAMe access phoots, media andfiles on your device?

I was wondering (since it’ll fear people for only viewing already existing photos in the assets folder) if we can disable this permission asking.
Maybe if we put {share:false} but even if that works (i havent tested) this option is only available for android ?

Posts: 1

Participants: 1

Read full topic

Error: ENOENT: no such file or directory,

$
0
0

@User23_roy wrote:

Hi, I am still having this problem and is really VERY frustrating…any can help ?

Error: ENOENT: no such file or directory, open ‘C:\Users\monako\roy\src\pages\news\news.js’
@ ./src/app/app.module.ts 15:0-52

Ionic info :

cli packages: (C:\Users\monako\AppData\Roaming\npm\node_modules)

@ionic/cli-utils  : 1.13.1
ionic (Ionic CLI) : 3.13.2

global packages:

cordova (Cordova CLI) : not installed

local packages:

@ionic/app-scripts : 3.0.0
Cordova Platforms  : android 6.3.0
Ionic Framework    : ionic-angular 3.7.1

System:

Android SDK Tools : 25.2.5
Node              : v8.7.0
npm               : 2.15.12
OS                : Windows 10

Misc:

backend : pro

Posts: 1

Participants: 1

Read full topic


How do I implement Facebook post loader in ionic 3?

Ionic Pro: I cant start my project,can somone help me? -ionic

$
0
0

@chanek wrote:

I cant start myapp, it happend when i run ionic start, how to fix this??
capture-20171022-020727
thankyou everyone

Posts: 2

Participants: 2

Read full topic

Error: Cannot find module './break-up'

$
0
0

@adibahhanun wrote:

I need help. I didn’t edit anything, and my app can be run without any problem until today, I tried to ionic serve, I came to this error:

Error: Cannot find module './break-up’
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (C:\Users\User\mytodos\node_modules\clean-css\lib\properties\compactable.js:3:15)
at Module._compile (module.js:570:32)
at Object.Module._extensions…js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)

This is my ionic info

cli packages: (C:\Users\User\AppData\Roaming\npm\node_modules)

@ionic/cli-utils  : 1.13.0
ionic (Ionic CLI) : 3.13.0

global packages:

cordova (Cordova CLI) : 7.0.1

local packages:

@ionic/app-scripts : 2.1.4
Cordova Platforms  : android 6.2.3
Ionic Framework    : ionic-angular 3.7.1

System:

Node : v6.10.3
npm  : 5.5.1
OS   : Windows 10

Misc:

backend : pro

I also get this error saying “Could not parse package.json. Is it a valid JSON file?” This is my package.json

{
“name”: “mytodos”,
“version”: “0.0.1”,
“author”: “Ionic Framework”,
“homepage”: “http://ionicframework.com/”,
“private”: true,
“scripts”: {
“clean”: “ionic-app-scripts clean”,
“build”: “ionic-app-scripts build”,
“lint”: “ionic-app-scripts lint”,
“ionic:build”: “ionic-app-scripts build”,
“ionic:serve”: “ionic-app-scripts serve”
},
“dependencies”: {
"@angular/common": “4.1.3”,
"@angular/compiler": “4.1.3”,
"@angular/compiler-cli": “4.1.3”,
"@angular/core": “4.1.3”,
"@angular/forms": “4.1.3”,
"@angular/http": “4.1.3”,
"@angular/platform-browser": “4.1.3”,
"@angular/platform-browser-dynamic": “4.1.3”,
"@ionic-native/core": “3.12.1”,
"@ionic-native/file": “^4.2.1”,
"@ionic-native/file-transfer": “^4.2.1”,
"@ionic-native/splash-screen": “3.12.1”,
"@ionic-native/status-bar": “3.12.1”,
"@ionic/storage": “^2.0.1”,
“cordova-android”: “^6.2.3”,
“cordova-plugin-compat”: “^1.0.0”,
“cordova-plugin-console”: “^1.0.5”,
“cordova-plugin-device”: “^1.1.4”,
“cordova-plugin-file”: “^4.3.3”,
“cordova-plugin-file-transfer”: “^1.6.3”,
“cordova-plugin-splashscreen”: “^4.0.3”,
“cordova-plugin-statusbar”: “^2.2.2”,
“cordova-plugin-whitelist”: “^1.3.1”,
“cordova-sqlite-storage”: “^2.0.4”,
“ionic-angular”: “^3.7.1”,
“ionic-image-loader”: “^4.2.1”,
“ionic-plugin-keyboard”: “^2.2.1”,
“ionicons”: “3.0.0”,
“rxjs”: “5.4.0”,
“sw-toolbox”: “3.6.0”,
“zone.js”: “0.8.12”
},
“devDependencies”: {
"@ionic/app-scripts": “2.1.4”,
“typescript”: “2.3.4”
},
“description”: “An Ionic project”,
“cordova”: {
“plugins”: {
“cordova-plugin-console”: {},
“cordova-plugin-device”: {},
“cordova-plugin-splashscreen”: {},
“cordova-plugin-statusbar”: {},
“cordova-plugin-whitelist”: {},
“ionic-plugin-keyboard”: {},
“cordova-plugin-file”: {},
“cordova-plugin-file-transfer”: {},
“cordova-sqlite-storage”: {}
},
“platforms”: [
“android”
]
}
}

Please help me out as I really have no idea where the problem is bcs I didn’t edit anything :frowning:

Posts: 1

Participants: 1

Read full topic

Problem in relive and app

$
0
0

@javadk2 wrote:

hi
i am new in ionic.
i have 2 problems.
1- when i change my code in home.html, the output in google chrome emulator, dont change or relive automatically.
2- i have an iphone, and now install the app, but dont work and i cant log in. i find this error: " invalid credentials". i fill my email and pass correctly.
please help me
thanks

Posts: 1

Participants: 1

Read full topic

Problem installing apk

$
0
0

@Zeta10 wrote:

Hello! I have a problem installing the apk file in my android movile phone (is not only in my phone). I create a ionic app with

  • ionic start myApp sidemenu after that
  • ionic cordova platform add android, and finally
  • cordova build android --release

When I execute ionic serve run perfect but when I try to install my apk file in my android movile phone I can’t install it, I have this message: “X application not installed”

Somebody know can I fix the problem?

Thanks in advance!!

Posts: 1

Participants: 1

Read full topic

Web Animations and cached views

$
0
0

@pliablepixels wrote:

Hi there, for folks using web animation APIs, how do you deal with cached views? For example, whenever a view shows up, I’d like for a particular component to be animated.
I’m looking for a clean way to do it that does not involve hide and re-create hacks in ionViewWillEnter() if possible. Any ideas or experiences to share?

For example, I want my <ion-footer> to always animate when the view is loaded (cached or not).

So I did this:

  animations: [
    trigger('cardUsed', [

      state('in', style({transform: 'translateY(0)'})),
      transition('void => *', [
        style({transform: 'translateY(100%)'}),
        animate(400)
      ])
    ])
]
<ion-footer [@cardUsed]="'in'" class="cardFooter">
    <p text-center>card in use: {{cardInUse}}</p>
  </ion-footer>

This works fine the first time, but after that its all cached, so the DOM never really gets re-created. Is there a clean way to solve this?

Posts: 1

Participants: 1

Read full topic

CPF/CNPJ Input Mask

$
0
0

@TomCosta wrote:

Add CPF/CNPJ mask in the same form field on Ionic 3. DEMO
Independent of which one is inputed either a CPF or a CNPJ. After a couple of days working for a solution I create myself this one simple that works. So I would like to share with the community that solution, and if you want you can improve it and share again.

login.html

<form #loginForm="ngForm">
  <ion-item>
    <ion-label floating>CPF/CNPJ</ion-label>
    <ion-input [(ngModel)]="cpf_cnpj" (blur)="cpf_cnpj = format(cpf_cnpj)" name="cpf_cnpj"></ion-input>
  </ion-item>
  <button ion-button full type="submit" color="sicor" (tap)="login(signForm.value)">Login</button>
</form>

login.ts


import { MenuController, NavParams, ModalController } from 'ionic-angular';
import { IonicPage, NavController } from 'ionic-angular';
import { AlertController } from 'ionic-angular';
import { Component } from '@angular/core';

@IonicPage()
@Component({
  selector: 'page-login',
  templateUrl: 'login.html',
})
export class LoginPage {

  cpf_cnpj = '';
  DECIMAL_SEPARATOR=".";
  GROUP_SEPARATOR=",";
  pureResult: any;
  maskedId: any;
  val: any;
  v: any;

constructor(
  public modalCtrl: ModalController,
  private alertCtrl: AlertController,
  private menu: MenuController,
  public navCtrl: NavController,
  ){}

  ionViewDidEnter() {
    this.menu.swipeEnable(false);
  }
  ionViewWillLeave(){
    this.menu.swipeEnable(true);
  }

  format(valString) {
    if (!valString) {
        return '';
    }
    let val = valString.toString();
    const parts = this.unFormat(val).split(this.DECIMAL_SEPARATOR);
    this.pureResult = parts;
    if(parts[0].length <= 11){
      this.maskedId = this.cpf_mask(parts[0]);
      return this.maskedId;
    }else{
      this.maskedId = this.cnpj(parts[0]);
      return this.maskedId;
    }
};

unFormat(val) {
    if (!val) {
        return '';
    }
    val = val.replace(/\D/g, '');

    if (this.GROUP_SEPARATOR === ',') {
        return val.replace(/,/g, '');
    } else {
        return val.replace(/\./g, '');
    }
};

 cpf_mask(v) {
    v = v.replace(/\D/g, ''); //Remove tudo o que não é dígito
    v = v.replace(/(\d{3})(\d)/, '$1.$2'); //Coloca um ponto entre o terceiro e o quarto dígitos
    v = v.replace(/(\d{3})(\d)/, '$1.$2'); //Coloca um ponto entre o terceiro e o quarto dígitos
    //de novo (para o segundo bloco de números)
    v = v.replace(/(\d{3})(\d{1,2})$/, '$1-$2'); //Coloca um hífen entre o terceiro e o quarto dígitos
    return v;
}

 cnpj(v) {
    v = v.replace(/\D/g, ''); //Remove tudo o que não é dígito
    v = v.replace(/^(\d{2})(\d)/, '$1.$2'); //Coloca ponto entre o segundo e o terceiro dígitos
    v = v.replace(/^(\d{2})\.(\d{3})(\d)/, '$1.$2.$3'); //Coloca ponto entre o quinto e o sexto dígitos
    v = v.replace(/\.(\d{3})(\d)/, '.$1/$2'); //Coloca uma barra entre o oitavo e o nono dígitos
    v = v.replace(/(\d{4})(\d)/, '$1-$2'); //Coloca um hífen depois do bloco de quatro dígitos
    return v;
}

  public login(formData) {
       ....you auth code here.
}

Here is… I hope it helps you!

Posts: 1

Participants: 1

Read full topic


Updated app and now have errors

$
0
0

@SuperRoo wrote:

Hi,
have updated a running ionic2+ app with the following
npm install ionic cordova
npm install firebase angularfire2
npm install
now am getting problems with polyfills and firebase and basically the app opens the front login page and that’s it…internal server errors from then on.

This happened once before and I had to create a new blank app and copy all the code across for the app to work…really don’t want to do it again…have followed all the advice on posts re updating plugs but nothing seems to work.

Is there a consistent way of updating an Ionic2+ app that doesn’t involve all the convoluted install/update/uninstall/etc/etc to get it to work again??

Posts: 1

Participants: 1

Read full topic

Building for PWA only

$
0
0

@michaelo wrote:

Basically I use a single code base to create a PWA and also build for Cordova.

I have some cordova plugins, which are all wrapped in an if statement, e.g

if(this.platform.is('cordova')) {...}

The only thing is for when I deploy as a PWA it means that all the cordova plugins are still included in the vendor.js file, even after using --prod (which takes the bundle from 7mb~ -> 2mb~) this is still quite considerably large and all unnecessary as the cordova plugins won’t be needed in the PWA.

Has anybody faced this issue and how did they get around producing a smaller bundle?

Posts: 1

Participants: 1

Read full topic

Assign array variable to an array from NavParams

$
0
0

@jjadulco wrote:

Hi! I’m new to Ionic. Can you please help me with this error I am getting?

Error: Module parse failed: C:\Users\student\Desktop\myIonicProject\myLoginForm\node_modules@ionic\app-scripts\dist\webpack\loader.js!C:\Users\student\Desktop\myIonicProject\myLoginForm\src\pages\sliding-list\sliding-list.ts Unexpected token (22:27)
You may need an appropriate loader to handle this file type.
| this.navCtrl = navCtrl;
| this.navParams = navParams;
| this.players = any[];
| players = navParams.get(‘players’);
| }

In my PlayersPage I have players array and I want to pass the same to sliding-list.ts,

export class PlayersPage {

team: any;
players: any[];

constructor(public navCtrl: NavController, public navParams: NavParams) {
this.team = navParams.get(‘team’);
this.players = [];
//Populate Players
for(let i = 0; i < 10; i++){
this.players.push({
text : 'Player ’ + i,
id : i
});
}
}

connect(players){

this.navCtrl.push(SlidingListPage,{players:players});

}

I want to assign an array variable in SlidingListPage

export class SlidingListPage {

players = any[];

constructor(public navCtrl: NavController, public navParams: NavParams) {
players = navParams.get(‘players’);

}

Your responses will be highly appreciated. Thank you in advance.

Posts: 1

Participants: 1

Read full topic

How to get fetch second paragraph data from JSON Data?

$
0
0

@vortexplaytv wrote:

Hello how do i fetch data from second paragraph of JSON Data.
i mean i have a data like

          Para 1: Lorem Ipsum is simply dummy text of the printing and typesetting industry.

          Para 2: Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.

i tried to use .substr(0, 80) but its not always sure when first para will end.

Is there something i can use to fetch data from “Para2:” instead from the start?
ThanK You

Posts: 1

Participants: 1

Read full topic

Ionic Angular Base64 Image issues

$
0
0

@rkhaili wrote:

Hello,

I am having issues with Base64 images that are called in Ionic as below

[ngStyle]="{'background-image': 'url(' + category.imgBg+ ')'}"

I have a single image that loads fine, while others load half only, and some don’t load at all - showing white only.

I am pretty sure it is not the code, as if it is, all the images will be white or half loaded.

I am having the same on ionic browser testing (not ionic serve), and on ios simulator and real device. The other ones are showing fine as they are the full URL and not base64.

Example of Base64 of not working image: https://paste.ee/p/SlN0L

Example of working image: https://paste.ee/p/KWSsy

Using a different base64 generator (openssl base64 -A), getting more of the image (more than half), but low quality too… as you can see the grey background from the back (default color)

Your help is appreciated :slight_smile:

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>