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

Error: spawn EACCES on a fresh install


Ngui Tab error... anyone?

$
0
0

@jamesharvey wrote:

Hello Ionic users,

I’m using an npm component called ngui Tab which is just a normal javascript tab.
I found it working in Ionic pretty well.

It works fine when I build an apk file uisng
ionic cordova build android --release

However it doesn’t work when I try to build an apk using:
ionic cordova build android --release --prod

It gives me this error:

Error: Unexpected value 'NguiTabModule in C:/Users/MyLaptop/demo-app/node_modules/@ngui/tab/dist/tab.module.d.ts' imported by the module 'AppModule in C:/Users/MyLaptop/demo-app/src/app/app.module.ts'. Please add a @NgModule annotation.
    at Error (native)
    at syntaxError (C:\Users\MyLaptop\demo-app\node_modules\@angular\compiler\bundles\compiler.umd.js:1729:34)
    at C:\Users\MyLaptop\demo-app\node_modules\@angular\compiler\bundles\compiler.umd.js:15577:44
    at Array.forEach (native)
    at CompileMetadataResolver.getNgModuleMetadata (C:\Users\MyLaptop\demo-app\node_modules\@angular\compiler\bundles\compiler.umd.js:15560:49)
    at addNgModule (C:\Users\MyLaptop\demo-app\node_modules\@angular\compiler\bundles\compiler.umd.js:24403:58)
    at C:\Users\MyLaptop\demo-app\node_modules\@angular\compiler\bundles\compiler.umd.js:24414:14
    at Array.forEach (native)
    at _createNgModules (C:\Users\MyLaptop\demo-app\node_modules\@angular\compiler\bundles\compiler.umd.js:24413:26)
    at analyzeNgModules (C:\Users\MyLaptop\demo-app\node_modules\@angular\compiler\bundles\compiler.umd.js:24288:14)

Why does this happen?
It looks like it’s because this Ngui npm module is not really an original angular or ionic module?

When I remove NguiTabModule from app.module.ts and imports, I can bypass that error and build an apk file using --release --prod command.
However then my app is forever stuck on loading screen…
I need some help.

Thanks,

Posts: 1

Participants: 1

Read full topic

Keep data in service, or in Pages?

$
0
0

@Vartex05 wrote:

I know this question was already discussed here a lot. i read some opinions, which favoured storing data in Pages, and use services just as data delivery, and store no data in services themselves. Why is it better then have data stored in service, so i can easily get to them from any page, that the service is injected in?

If i save data in pages, isnt it a needless complication? For example i have three pages, that need data from one service. On each page u have to fetch data and synchronize them on each of the pages. So now its 3 copys of same data. In same case, if i have data in service, all three pages can easily access them, and only the service have to handle updates and so on. So where is the advantage of the storing data in pages? Can pls someone explain it maybe with some example? :slight_smile: Thx a lot :slight_smile:

Posts: 1

Participants: 1

Read full topic

Production mode errors in browser

$
0
0

@pankee wrote:

Hi,

I’m trying to test my app in production mode in my browser. The app is meant to run on iPad but I just want to make sure some variables are set up properly in production mode.

My package.json looks like so:

  "scripts": {
    "start": "ionic serve",
    "docs": ".\\node_modules\\.bin\\typedoc --out ./docs/ ./src/",
    "clean": "ionic-app-scripts clean",
    "build": "rimraf www && ionic-app-scripts build --aot --prod",
    "lint": "ionic-app-scripts lint",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  }

When I run the npm run build command, a www folder is created in the root of my project. When I open the index.html file in that folder, a few errors appear:

image

It looks like it can’t find a cordova.js file and it also looks like it can’t properly enable prod mode.
My [DEVELOPMENT MODE] line is called in a random config file I use:

import { isDevMode } from '@angular/core';

let apiConfig = {
   apiUrl: '',
   logAuthorizationToken: ''
};
if (isDevMode()) {
   console.log('[DEVELOPMENT MODE]');
   apiConfig = {
       apiUrl: 'https://xxxxxxxx/xxx',
       logAuthorizationToken: 'xxxxxxx'
   };
} else {
   console.log('[PRODUCTION MODE]');
   apiConfig = {
       apiUrl: 'https://xxxxxxxx/xxx',
       logAuthorizationToken: 'xxxxxxx'
   };
}

I must be missing something obvious, but I can’t really tell what.
Thank you for your help!

Posts: 2

Participants: 2

Read full topic

Systemjs.config.js equivalent on Ionic?

$
0
0

@jamesharvey wrote:

Hello guys,

what is angular’s systemjs.config.js equivalent on Ionic?

I’m trying to use above npm angular tab… and it requires me to insert following to systemjs.config.js

map['@ngui/tab'] = 'node_modules/tab/dist/tab.umd.js';

It works without this line inserted however it causes errors when I try to build an apk file using --prod command.

Posts: 1

Participants: 1

Read full topic

Tabs with multilevel or sub menus

$
0
0

@GabrielGomes095 wrote:

Hello folks,

I’m new on Ionic 3, i want to create a Tab menu template with, multi level option, example: in tabs from Ionic, we have 3 tabs, each tabs will open something like popover, with some option.

Can someone give me path to do it? how can i manipulate tabs.html

Posts: 1

Participants: 1

Read full topic

.metadata.json file

$
0
0

@jamesharvey wrote:

Hello,

How can I create a .metadata.json file for an npm folder locally?
I found out this package I’m trying to use is missing .metadata.json file…

It causes errors when I try to compile apk file using --prod command on Ionic.

Let me know if you guys have any info on this problem.

Thanks,

Posts: 1

Participants: 1

Read full topic

Ion input is freezed

$
0
0

@ramamd wrote:

I have the following login form:

<form>
        <ion-item>
            <ion-label floating>Alias</ion-label>
            <ion-input [(ngModel)]="auth.login" name="login" type="text"></ion-input>
        </ion-item>
        <ion-item>
            <ion-label floating>Password</ion-label>
            <ion-input [(ngModel)]="auth.password" name="login" type="password"></ion-input>
        </ion-item>
        <button class="submit" type="button" ion-button block (click)="login()">Login</button>
</form>

When i write my alias or password the input field stay freezed (i can’t see the cursor and the keyboard also doesn’t show up) so, i can’t write my alias or password again. There is a screenshot, any ideas ?

I am using:

  • Cordova 7.1.0
  • Ionic 3.19.0
  • Android 7 and Android 6

Posts: 1

Participants: 1

Read full topic


How to update icon on tabs with custom image from a variable?

$
0
0

@Abhisht12 wrote:

Hi Ionic team,

last time when I used Ionic 1 there was a hack that was used to display the custom image as the icon on my tabs.

I am currently using Ionic 2 I have looked into the code and I am not sure how to get started if I want to include my own image on the tabs as my icon.

Any leads would be helpful. CSS classes will not help because I can’t update them dynamically. Any other suggestion on how to do it would be highly appreciated as this is a big problem for me along with the fact that I can’t change colors dynamically on navbars and tabs bars from a value in one of my local variabless either.

Posts: 1

Participants: 1

Read full topic

POST URL net::ERR_BLOCKED_BY_CLIENT

$
0
0

@SmeRT59 wrote:

I switched to paid hosting, where all the files were transferred from the old domain.

Now this is the problem (How can I fix it? I understand that sending data is blocked on the client side … Is this so?

Posts: 2

Participants: 1

Read full topic

Native In-App payment success but returns -1003 response

$
0
0

@akhilsanker94 wrote:

Hi community,

Using ionic native in-app purchase.I have added my email in play console in Licence Testing.
I tested payment with cordova run android, and the first product purchase was successful but responded with -1003, signature error, and for the further it getProducts() returns ‘Error retrieving SKU’ but can make payment with the device.

Any suggestion for avoiding -1003 error and to get a success response after making the payment.

Any suggestion is appreciable.

Thanks.

Posts: 1

Participants: 1

Read full topic

SQL select and push not working

$
0
0

@eciadmin wrote:

I have a select all statement from my sqlite table and my program never seems to get to it, or it doesn’t work. The alerts are there so I can see how far the code is going and I never get an alert passed table opened, which means it isn’t getting passed the select statement.
Can anybody help me solve this issue?

getData() {

this.sqlite.create({
  name: 'ionicdb.db',
  location: 'default'
}).then((db: SQLiteObject) => {
  alert("table opened");

  db.executeSql('SELECT * FROM alerts', []).then(resultSet=> {
    alert("passed select");
    this.alertsArray = [];
    if(resultSet.res.rows.length > 0) {
    for(let i = 0; i<resultSet.res.rows.length; i++) {
      this.alertsArray.push({
        "title":resultSet.res.rows.item(i).title,
        "body":resultSet.res.rows.item(i).body})
      alert("push items");
    }
  } //end of if
  })
})

} //END OF GETDATA

Posts: 1

Participants: 1

Read full topic

Calling a provider function returns undefined

$
0
0

@Cypaubr wrote:

Hello, I have a provider for consuming my REST API but I have a problem when I try to get the response from it.

Here is the method of my provider:

getBusinesses(token: string){
    return new Promise((resolve,reject) => {
      let request = new HttpRequest('GET',this.listBusinesses,{
        headers: new HttpHeaders({
          'X-AUTH-TOKEN': token
        })
      });

      this.http.request(request).subscribe(data => {
        console.log(data['body']); //works, show my JSON array
        resolve(data);
      }, err => {
        reject(err);
      })
    });
  }

And here is the method called by my view:

private getBusinesses() {
    this.cityfidAPI.getBusinesses(token).then(res => {
      this.businesses = res['body'];
      console.log(this.businesses); //undefined
    });
}

As you see, I have 2 console.log() on dispays the list and the second displays ‘undefined’ and I don’t know why…

Cheers!

Posts: 1

Participants: 1

Read full topic

Ion-note under ion-label

Urgent : how can i import com.adjust.sdk plugin


Switch tabs and push page on tap

$
0
0

@juniethreatt wrote:

I have an app with tabs at the bottom of the screen, and one of those tabs loads another set of tabs at the top of the screen. When I am on that tab, I want to be able to tap a link that will switch to a different tab and push the page so that I only have the tabs at the bottom. Or be able to push the page on the current tab, but hide the tabs at the top of the screen. Is this possible?

Posts: 1

Participants: 1

Read full topic

Select and insert into php/mysql

$
0
0

@valentinay wrote:

hello i have 2 tables account_info and patient_info i want the user to fill first the account_info table and then the patient_info
but i have to select account_id and patient_username from account_info and insert them in patient_info then the user enters patient name and the rest of the information
i have :

  $sql  = "INSERT INTO patient_info(p_username, acc_id, p_fname, p_lname, p_gender, p_condition,
 p_birthdate, p_emergencycontact)
					SELECT p_username, acc_id
						FROM account_info
  VALUES(:p_fname, :p_lname, :p_gender, :p_condition, :p_birthdate,
:p_emergencycontact)";

Posts: 2

Participants: 2

Read full topic

Debug stencil app starter kit not working

$
0
0

@michael28 wrote:

Even after putting a breakpoint and hit debug mode, when you hover over the breakpoint it says “Breakpoint ignored because generated code not found (source map problem?).”

I am using https://github.com/ionic-team/stencil-app-starter.

I don’t see any tsx map files created when I build the app.
Does the app starter kit has a configuration issue for creating those source maps? Or am I missing something?

Posts: 1

Participants: 1

Read full topic

How can I create tabs using typescript and html?

$
0
0

@jamesharvey wrote:

Hello guys,

How can I create a regular HTML div & typescript tab on Ionic?

I want to have several html tabs at the top of my ionic page.
and I want to each tab to have different contents…

Is there any way? I don’t want to use stock ionic tab which requires several pages. Everything should be done on a single html page.

Thanks,

Posts: 1

Participants: 1

Read full topic

Include other page

Viewing all 49526 articles
Browse latest View live