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

Browser build doesn't work anymore

$
0
0

@jfan29 wrote:

Runs perfectly on localhost but When I try to build it with

ionic cordova build browser --prod --release

It throws me this error any fixes for this now??

You have been opted out of telemetry. To change this, run: cordova telemetry on.
Unable to load PlatformApi from platform. Error: Cannot find module 'C:**\platforms\browser\cordova\Api.js’
Error: Uncaught, unspecified “error” event. (The platform “browser” does not appear to be a valid cordova platform. It is missing API.js. browser not supported.)
[ERROR] An error occurred while running cordova build browser (exit code 1).

Posts: 2

Participants: 1

Read full topic


Page Refresh / Rendering

$
0
0

@bronxyme wrote:

I’m using HERE Maps (type definitions for HERE Maps API for JavaScript). I have noticed that the marker is not updating like I mentioned it in normal Javascript. For example,after I have set a new zoom map.setZoom() or any other available map method, the map is not being updated. Only after re-entering the page.

But I have found out when Im using an PopoverController and closing the popover window again on an onDidDismiss() method the page is rendering new and the map changes are passed and visible.

So my question, how can I produce are page refresh like when I’m closing a Popover-Page. By the way, tried out with windows.reload function. But in this case I’m losing all initialize page variables.

Thanks in advance, Ionic-Community.

Posts: 1

Participants: 1

Read full topic

Ionic View Support for Android Fingerprint

$
0
0

@phill_zware wrote:

Hi,

I wanted to find out if there is any support for fingerprint on android is supported in Ionic View or if not when please?
Preferably using Fingerprint AIO or Android Fingerprint Auth plugins

Posts: 1

Participants: 1

Read full topic

How to update the side menu profile pic after login

$
0
0

@flycoders_sourav wrote:

How to update the side menu profile pic after login.actually i want to do when user login after that showing the pic inside the side menu.

Posts: 6

Participants: 2

Read full topic

Webview In Ionic 3

$
0
0

@ikishan1 wrote:

i want to load my website in ionic app straightforward. i use InAppBrowser to load the url but the url bar is not hidden even after i setlocation=no in create method like following
const browser = this.iab.create('https://ionicframework.com/,'_self','location=no'');
also when i press the back button it will go to default home page.
Is there any component in ionic like android provide webview ?

Posts: 1

Participants: 1

Read full topic

Google developer tools - memory leak tracing in ionic app

$
0
0

@teltest007 wrote:

I’ve been trying to trace memory leaks in a hybrid-app built using ionic. I tried using the Google’s developer tools for the same. When i perform heap dump and try tracing any Constructor value, I get there is a Detached DOM tree is present but when i expand the same and view the origin in Objects in the Retainers tab, I’m not able to find which file the variable is located. With this I’m able to say that there is a memory leakage but not the file where it is located. Is there any way to find the file in which the variable or the array causing the leakage is present.In below picture, I’m not finding a way as to how to trace the file of the memory leak present:

Posts: 1

Participants: 1

Read full topic

Usertype based login

$
0
0

@dipankar123 wrote:

hi guys i am new in ionic 2,
facing problem related to login based on userRoll
i have created login html and function. and it worked perfectly before if/else condintion added
i want to push my page to ‘StudentCornerPage’ if (UserRole==3)
or to ‘TStudentAttendencePage’ if (UserRole==2)
my login API returns { UserRole, name, present, etc etc}
please help me
here is my code:

constructor(public navCtrl: NavController,
public navParams: NavParams,
public storage: Storage,
public userProvider: UserProvider,
public menuCntlr: MenuController,) {

this.storage.get('token').then((value) => {
//  **showing error after adding this**
  if (value.UserRole==3) {
    console.log('Token : ' + value);
    this.navCtrl.setRoot("StudentCornerPage");
  }
  if( value.UserRole==2){
    this.navCtrl.setRoot('TStudentAttendencePage');
  }
});

this.loginDTO = { UserName: "", Password: "" };
//this.menuCntlr.swipeEnable(false);

}

createAccount() {
this.navCtrl.push(‘RegisterPage’);
}

login() {

console.log("login clickd");
this.userProvider.login(this.loginDTO).then(data => {
  if (data) {
    this.storage.set('token', JSON.stringify(data));
    this.user=JSON.stringify(data);
    console.log('user:'+this.user);

//showing error after adding this condition
if(this.user.UserRole==2){
console.log(‘userRole:’+this.user.userRole);
this.navCtrl.push(‘TStudentAttendencePage’);
}
if(this.user.UserRole==3){
this.navCtrl.push(‘StudentCornerPage’);
}

  }
});

}

Posts: 1

Participants: 1

Read full topic

When and why NOT to use `--prod` for building?

$
0
0

@Audrey84 wrote:

What would be a reason or time not to use --prod in the build command to get an optimized (smaller, faster) build of my Ionic app? What is the benefit of doing a build without it?

Posts: 4

Participants: 3

Read full topic


Strange problem with

$
0
0

@inartech wrote:

Hell guys… I have two inputs like:

<ion-input type=“username” placeholder="{{‘TYPE YOUR USERNAME’ | translate}}" name=“username” [(ngModel)]=“username”>
<ion-input type=“password” placeholder="{{‘TYPE YOUR PASSWORD’ | translate}}" name=“password” [(ngModel)]=“password”>

The problem is that after 3-4 changes of the focused input, I can’t focus on or write to either of two inputs. This is only happens on release apk. On debug.apk
all work fine. The problem apperas only on Android devices! Do you have any idea???

Posts: 1

Participants: 1

Read full topic

Ionic app content load delay? how to?

$
0
0

@Dar3lis wrote:

Hey guys.

I have a tab let’s say it’s called dashboard.
So once I open dashboard all the content is loaded. Everything works perfect, but once I try to scroll down a little bit quicker or scroll back to top the content goes white for like 1sec and it shows again. Not a nice delay :smiley:

Any ideas how to fix it? Any ideas would be highly appreciated!
Have a nice day

Posts: 1

Participants: 1

Read full topic

Evaluating Ionic: Playing (previously encrypted) video stream

$
0
0

@hardcodet wrote:

Hi all

We’re coming from Xamarin, and are evaluating alternative frameworks for a new project (Xamarin would be a nice platform, but all the bugs basically sum up to a slow death by a thousand cuts. I’ve sort of had it…).

With regards to Ionic, I think we’re covered for most use cases, but we have one slightly exotic use case:

  • Given I have is encyrpted media data (local file or in the cloud)…
  • …I want to decrypt it on the fly (creating a stream from the file or the incoming HTTP stream)
  • …And play the media (let’s say a video)

I could probably do this rather easily native or in Xamarin, but not sure whether Ionic gives me the capabilities (file access, crypo classes, streaming).

Thanks for your advice
Philipp

Posts: 1

Participants: 1

Read full topic

Webview In Ionic

$
0
0

@ikishan1 wrote:

i want to load my website in ionic app straightforward. i use InAppBrowser to load the url but the url bar is not hidden even after i setlocation=no in create method like following
const browser = this.iab.create('https://ionicframework.com/,'_self','location=no'');
also when i press the back button it will go to default home page.
Is there any component in ionic like android provide webview ?

Posts: 1

Participants: 1

Read full topic

Ionic 2 beta version - image upload issue on some android devices

$
0
0

@prpatel wrote:

I am using ionic 2 beta version and i used this code for image uploading on server.this works well on ios platform but it did not worked on some android mobiles.

I am using this angular code

this.model.image = event.target.files[0];
if (this.model.image) {
  let reader = new FileReader();
  var self = this;
  reader.onloadend = function(readerEvt: any) {
    var aa = readerEvt.target.result;
    self.model.imageString = readerEvt.target.result;
  };
  reader.readAsDataURL(this.model.image);
}

Kindly suggest the better way of image uploading so it will work on all the mobile phones of ios and android

Posts: 1

Participants: 1

Read full topic

Dont work HTTP module

$
0
0

@SmeRT59 wrote:

To import the module, I used this guide:

https://forum.ionicframework.com/t/guide-how-to-update-to-ionic-3-x/87516

But still it does not work. The application is created on Ionic 3.

What is the problem?

app.modules.ts

import { HTTP } from ‘@ionic-native/http’;
import { HttpModule } from ‘@angular/http’;
import { HttpClientModule } from ‘@angular/common/http’;

import { NgModule, ErrorHandler } from ‘@angular/core’;
import { BrowserModule } from ‘@angular/platform-browser’;
import { IonicApp, IonicModule, IonicErrorHandler } from ‘ionic-angular’;
import { MyApp } from ‘./app.component’;
import { Page1Page } from ‘…/pages/page1/page1’;
import { Page2Page } from ‘…/pages/page2/page2’;
import { Page3Page } from ‘…/pages/page3/page3’;
import { Page4Page } from ‘…/pages/page4/page4’;
import { Page5Page } from ‘…/pages/page5/page5’;

import { StatusBar } from ‘@ionic-native/status-bar’;
import { SplashScreen } from ‘@ionic-native/splash-screen’;

@NgModule({
declarations: [
MyApp,
Page1Page,
Page2Page,
Page3Page,
Page4Page,
Page5Page
],
imports: [
BrowserModule,
HttpModule,
HttpClientModule,
IonicModule.forRoot(MyApp)

page5.ts

import { Component } from ‘@angular/core’;
import { NavController } from ‘ionic-angular’;
import { FormGroup, Validators, FormBuilder } from ‘@angular/forms’;

import { HTTP } from ‘@ionic-native/http’;
import { HttpModule } from ‘@angular/http’;
@Component({
selector: ‘page-page5’,
templateUrl: ‘page5.html’
})
export class Page5Page {

private baseURI : string = “https://sportcomp.000webhostapp.com/”;

constructor(public navCtrl : NavController,
public http : Http,
public NP : NavParams,
public fb : FormBuilder,
public toastCtrl : ToastController)

ionViewWillEnter()
{
this.load();
}

// Retrieve the JSON encoded data from the remote server
// Using Angular’s Http class and an Observable - then
// assign this to the items array for rendering to the HTML template
load()
{
this.http.get(‘https://sportcomp@files.000webhost.com/mobileapp/retrieve-data.php’)
}
}

index.html

Error on page5.ts (or Registration page)

Runtime Error
Cannot read property ‘get’ of undefined

And after starting the server, too, it gives an error, until I re-save any file.

Typescript Error
Constructor implementation is missing.
c:/Android/
constructor(public navCtrl : NavController,
public http : Http,

I’m going to bind the user registration and the input to the MySQL database.

Help me please.

Posts: 1

Participants: 1

Read full topic

Splashscreen for Ionic website

$
0
0

@VinceBret wrote:

Hello,

I am using ionic to deploy a website and an app using the same base code. Is there a way to have a splashscreen working on the website version ?
During the module loading my page stay blank where I would like to display something like “Loading modules” so the website doesn’t look broken for the first few seconds.

Thanks.

Posts: 1

Participants: 1

Read full topic


Build Error in ionic v3

$
0
0

@vkr1980 wrote:

I have created an app using ionic v3
but trying to build the apk file CLI through an error

mysangham is my project name

I have used
ionic cordova run android to run the application in stimulator and it works fine

but
i used these command in CLI
ionic cordova run android --prod --release or ionic cordova build android --prod --release
it shows the following error

Running app-scripts build: --prod --platform android --target cordova
[15:57:12] build prod started …
[15:57:12] clean started …
[15:57:12] clean finished in 7 ms
[15:57:12] copy started …
[15:57:12] deeplinks started …
[15:57:12] deeplinks finished in 66 ms
[15:57:12] ngc started …
Error: Type ChapterPage in D:/Projects/ionic project/mySangham/android/src/pages
/chapter/chapter.ts is part of the declarations of 2 modules: AppModule in D:/Pr
ojects/ionic project/mySangham/android/src/app/app.module.ts and ChapterPageModu
le in D:/Projects/ionic project/mySangham/android/src/pages/chapter/chapter.modu
le.ts! Please consider moving ChapterPage in D:/Projects/ionic project/mySangham
/android/src/pages/chapter/chapter.ts to a higher module that imports AppModule
in D:/Projects/ionic project/mySangham/android/src/app/app.module.ts and Chapter
PageModule in D:/Projects/ionic project/mySangham/android/src/pages/chapter/chap
ter.module.ts. You can also create a new NgModule that exports and includes Chap
terPage in D:/Projects/ionic project/mySangham/android/src/pages/chapter/chapter
.ts then import that NgModule in AppModule in D:/Projects/ionic project/mySangha
m/android/src/app/app.module.ts and ChapterPageModule in D:/Projects/ionic proje
ct/mySangham/android/src/pages/chapter/chapter.module.ts.
at Error (native)
at syntaxError (D:\Projects\ionic project\mySangham\android\node_modules@an
gular\compiler\bundles\compiler.umd.js:1729:34)
at CompileMetadataResolver._addTypeToModule (D:\Projects\ionic project\mySan
gham\android\node_modules@angular\compiler\bundles\compiler.umd.js:15728:31)
at D:\Projects\ionic project\mySangham\android\node_modules@angular\compile
r\bundles\compiler.umd.js:15616:27
at Array.forEach (native)
at CompileMetadataResolver.getNgModuleMetadata (D:\Projects\ionic project\my
Sangham\android\node_modules@angular\compiler\bundles\compiler.umd.js:15607:54)

at addNgModule (D:\Projects\ionic project\mySangham\android\node_modules\@an

gular\compiler\bundles\compiler.umd.js:24403:58)
at D:\Projects\ionic project\mySangham\android\node_modules@angular\compile
r\bundles\compiler.umd.js:24414:14
at Array.forEach (native)
at _createNgModules (D:\Projects\ionic project\mySangham\android\node_module
s@angular\compiler\bundles\compiler.umd.js:24413:26)
[15:57:14] copy finished in 2.15 s

Please help

Posts: 4

Participants: 2

Read full topic

License issues: Android SDK Platform 26

$
0
0

@garg10may wrote:

I have downloaded the latest android studio for windows. But when I am trying to run

ionic corodova build android

it’s failing with below error.

Running app-scripts build: --platform android --target cordova
[16:08:10] build dev started …
[16:08:10] clean started …
[16:08:10] clean finished in 16 ms
[16:08:10] copy started …
[16:08:10] transpile started …
[16:08:20] transpile finished in 9.28 s
[16:08:20] webpack started …
[16:08:20] copy finished in 9.60 s
[16:08:31] webpack finished in 11.69 s
[16:08:31] sass started …
[16:08:34] sass finished in 2.39 s
[16:08:34] build dev finished in 24.16 s

cordova build android
ANDROID_HOME=C:\Users\tanmay\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_131
Subproject Path: CordovaLib
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_7o7xe2pxt883tg6ritz4aewbd.run(D:\mutrade\web\web\utrade\static\utrade\HybridApp\ionic\platforms\android\build.gradle:141)
Checking the license for package Android SDK Platform 26 in C:\Users\tanmay\AppData\Local\Android\sdk\licenses

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘android’.

You have not accepted the license agreements of the following SDK components:
[Android SDK Platform 26].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    Warning: License for package Android SDK Platform 26 not accepted.

BUILD FAILED

Total time: 3.447 secs
Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘android’.

You have not accepted the license agreements of the following SDK components:
[Android SDK Platform 26].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html

  • 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).

As in some answers here I changed the config.xml to include

but it had no affect.

Can anybody pls help me with the error.

Posts: 3

Participants: 2

Read full topic

Split Pane Toggle on Big screen

$
0
0

@suneetjain wrote:

I have a split pane in my application and it works as expected.

But I have a requirement that on the big screens when the split pane is visible, is there any way the user can toggle the split pane on big screens ?

test

Posts: 1

Participants: 1

Read full topic

App is not launching in browser

$
0
0

@dlovestech wrote:

Hello All,

I am beginner in ionic and i have installed ionic 3 blank template app. And then i try to run the app by ionic serve command it can’t open in web browser and just output like below.

output :

Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port
35729 --dev-logger-port 53703 --nobrowser - Ctrl+C to cancel
[17:49:50] watch started …
[17:49:50] build dev started …
[17:49:50] clean started …
[17:49:50] clean finished in 6 ms
[17:49:50] copy started …
[17:49:50] deeplinks started …
[17:49:50] deeplinks finished in 42 ms
[17:49:50] transpile started …
[17:50:00] transpile finished in 9.70 s
[17:50:00] preprocess started …
[17:50:00] preprocess finished in 1 ms
[17:50:00] webpack started …
[17:50:00] copy finished in 10.04 s
[17:50:10] webpack finished in 10.31 s
[17:50:10] sass started …
[17:50:12] sass finished in 2.04 s
[17:50:12] postprocess started …
[17:50:12] postprocess finished in 12 ms
[17:50:12] lint started …
[17:50:12] build dev finished in 22.28 s
[17:50:13] watch ready in 22.42 s
[17:50:13] dev server running: http://localhost:8100/

[OK] Development server running!
Local: http://localhost:8100
External: http://192.168.1.101:8100
DevApp: ionic-demo@8100 on admin-PC

Environment Information :

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

@ionic/cli-utils  : 1.18.0
ionic (Ionic CLI) : 3.18.0

global packages:

cordova (Cordova CLI) : 7.1.0

local packages:

@ionic/app-scripts : 3.1.2
Cordova Platforms  : none
Ionic Framework    : ionic-angular 3.9.2

System:

Node : v8.9.1
npm  : 5.5.1
OS   : Windows 7

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : pro

Please Please all ionic masters provide me your best ideas to run my app.

Posts: 5

Participants: 3

Read full topic

Problem accessing Jquery in a custom .js file included in iconic project

$
0
0

@saghari wrote:

I had a game developed by Createjs on html5 now i want to add this game to a page in iconi 3 project.
i installed jguery for ionic using npm

npm install jquery --save
typings install dt~jquery --global --save

and import it on top of ts file:

import * as $ from 'jquery'

and same method to install Createjs module

i did not add my costum .js file to index.htm instead i add it this way:

 ionViewDidLoad() {
var jQuery = $;
var script = document.createElement("script");
  script.src = "../assets/js/GameEngine.js";
  document.getElementsByTagName("head")[0].appendChild(script);
}

but in runtime i have error :

Runtime Error
jQuery is not defined
Stack
ReferenceError: jQuery is not defined
    at http://localhost:8100/assets/js/GameEngine.js:74:5
    at http://localhost:8100/assets/js/GameEngine.js:76:3

but $ is accessible in .ts file !
in other word i think since ionic is developing everyday there should be easiest way to include costum js files in this ts projects !?

Posts: 1

Participants: 1

Read full topic

Viewing all 49084 articles
Browse latest View live


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