@flycoders_sourav1 wrote:
How to create photo albums like facebook,please help me out
any help would be highly appreciated
Posts: 1
Participants: 1
@flycoders_sourav1 wrote:
How to create photo albums like facebook,please help me out
any help would be highly appreciated
Posts: 1
Participants: 1
@muratcankuruoffical wrote:
btcservice.ts page
import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; @Injectable({ providedIn: 'root' }) export class BtcService { public items:any; constructor (public navCtrl: NavController, public http: HttpClient) { this.getData(); } getData(){ let data: Observable<any> = this.http.get('https://api.coinmarketcap.com/v1/ticker/'); data.subscribe(result => { this.items = result; }); } }
home.page.ts page
import { Component } from '@angular/core'; import { NavController, ModalController } from '@ionic/angular'; import { HttpClient } from '@angular/common/http'; import { Observable, throwError } from 'rxjs'; import { CurrencyPage } from '../currency/currency.page'; import { Router } from '@angular/router'; import { BtcService } from '../btc.service'; //import { Push, PushObject, PushOptions } from '@ionic-native/push'; @Component({ selector: 'app-home', templateUrl: 'home.page.html', styleUrls: ['home.page.scss'], }) export class HomePage { constructor(private BtcService: BtcService){ } }
home.page.html
<ion-list> <ion-item [href]="'/currency/' + todo.id" detail="true" *ngFor="let item of BtcService.items"> {{item.id}} </ion-item> </ion-list>
Error not:
ERROR Error: Uncaught (in promise): Error: Arguments array must have arguments.
Error: Arguments array must have arguments.
at injectArgs (core.js:1804)
at core.js:15509
at callFactory (core.js:21182)
at createProviderInstance (core.js:21140)
at resolveNgModuleDep (core.js:21115)
at NgModuleRef .push…/node_modules/@angular/core/fesm5/core.js.NgModuleRef .get (core.js:21809)
at resolveNgModuleDep (core.js:21120)
at NgModuleRef_.push…/node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (core.js:21809)
at resolveDep (core.js:22180)
at createClass (core.js:22052)
at injectArgs (core.js:1804)
at core.js:15509
at callFactory (core.js:21182)
at createProviderInstance (core.js:21140)
at resolveNgModuleDep (core.js:21115)
at NgModuleRef .push…/node_modules/@angular/core/fesm5/core.js.NgModuleRef .get (core.js:21809)
at resolveNgModuleDep (core.js:21120)
at NgModuleRef_.push…/node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (core.js:21809)
at resolveDep (core.js:22180)
at createClass (core.js:22052)
at resolvePromise (zone.js:831)
at resolvePromise (zone.js:788)
at zone.js:892
at ZoneDelegate.push…/node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)
at Object.onInvokeTask (core.js:17280)
at ZoneDelegate.push…/node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:422)
at Zone.push…/node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:195)
at drainMicroTaskQueue (zone.js:601)
defaultErrorLogger @ core.js:15714
push…/node_modules/@angular/core/fesm5/core.js.ErrorHandler.handleError @ core.js:15762
next @ core.js:17761
schedulerFn @ core.js:13504
push…/node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.__tryOrUnsub @ Subscriber.js:196
push…/node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.next @ Subscriber.js:134
push…/node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._next @ Subscriber.js:77
push…/node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:54
push…/node_modules/rxjs/_esm5/internal/Subject.js.Subject.next @ Subject.js:47
push…/node_modules/@angular/core/fesm5/core.js.EventEmitter.emit @ core.js:13488
(anonymous) @ core.js:17311
push…/node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke @ zone.js:391
push…/node_modules/zone.js/dist/zone.js.Zone.run @ zone.js:150
push…/node_modules/@angular/core/fesm5/core.js.NgZone.runOutsideAngular @ core.js:17248
onHandleError @ core.js:17311
push…/node_modules/zone.js/dist/zone.js.ZoneDelegate.handleError @ zone.js:395
push…/node_modules/zone.js/dist/zone.js.Zone.runGuarded @ zone.js:164
_loop_1 @ zone.js:694
api.microtaskDrainDone @ zone.js:703
drainMicroTaskQueue @ zone.js:608
Promise.then (async)
scheduleMicroTask @ zone.js:584
push…/node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:413
onScheduleTask @ zone.js:301
push…/node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:404
push…/node_modules/zone.js/dist/zone.js.Zone.scheduleTask @ zone.js:238
push…/node_modules/zone.js/dist/zone.js.Zone.scheduleMicroTask @ zone.js:258
scheduleResolveOrReject @ zone.js:879
resolvePromise @ zone.js:825
(anonymous) @ zone.js:741
webpackJsonpCallback @ bootstrap:25
(anonymous) @ home-home-module.js:1
Posts: 1
Participants: 1
@babita112 wrote:
Hi Guys,
I have made the application in ionic. When I run it on the Android device it crashes sometimes. I think it crashes due to some plugin. How do I check for which reason it is crashing? Is there any kind of tool to check?
Posts: 1
Participants: 1
@coolestsumit wrote:
I am not getting the proper way to fetch unique device id of IOS devices in my ionic project. please help me
Posts: 1
Participants: 1
@OliverPrimo wrote:
Hello
I have an app that allows a user to select a photo from the gallery or take a photo via camera. I am trying to display an image that was taken via camera and it works fine, it returns a file path like
file:///Users/ray/Library/Developer/CoreSimulator/Devices/C8202B3B-300B-4819-8CD3-4C4AA690CE7C/ data/Applications/D82BF64E-6DD1-4645-B637-BCF65001FD29/tmp/cdv_photo_003.jpg
but when I try to select a photo from a gallery it shows a broken image thumbnail, and it turns a file path like.
content://com.android.providers.media.documents/document/image%3A21
Here is my code:
TS file
selectImage(sourceType) { const options: CameraOptions = { quality: 100, destinationType: this.camera.DestinationType.FILE_URI, encodingType: this.camera.EncodingType.JPEG, mediaType: this.camera.MediaType.PICTURE, saveToPhotoAlbum: true, sourceType: sourceType } this.camera.getPicture(options).then((imageData) => { let base64Image = 'data:image/jpeg;base64,' + imageData; this.imagePreview = imageData; }, (err) => { this.toastCtrl.presentToast(err); }); }
HTML File
<img src="{{imagePreview}}" />;
I’ve also tried searching for a solution but it didin’t work
Some of them suggests using this code
if (imageURI.substring(0,21)=="content://com.android") { photo_split=imageURI.split("%3A"); imageURI="content://media/external/images/media/"+photo_split[1]; }
but this solution is not that robust cause not all of the image sources returns the same file path that contains ‘content://com.android’ like the photos that came from Google Photos which returns ‘content://com.google.android’
Some of them also suggests using DATA_URL on destination type but it memory intensive and may cause the app to crash
Ionic CLI Version: PRO 4.2.1
Cordova Verion: 8.0.0
NPM Version: 6.4.1
Node.js version: 8.11.3
Platform: AndroidI hope someone could help me with this. Thank you in advance .
Posts: 1
Participants: 1
@japostigo_atsistemas wrote:
Due the lastest updates on platform webviews, cors as become a problem in our Ionic apps. For that reason, we need to use cordova-plugin-advanced-http plugin to perform http calls from mobile devices. However, in web enviroment, Angular’s HttpClient still need to be used. So we have to do our own wrapper to use one or another way of using http depending of the platform. I really don’t know why Ionic Team haven’t gone in deep with this… it’s supposed that the app should work in both, mobile and web. Anyway I’ve found ionic-native-http-connection-backend, which deals with this problem!. I’m not the author of it, but I wanted to share it with the community.
Posts: 1
Participants: 1
@flycoders_sourav1 wrote:
While i using this plugin in showing and error screenshots give in blow
please help me out @Sujan12
Posts: 1
Participants: 1
@KenTummers wrote:
I am trying to make a page where I can edit information from a news article. At first I have a news page, where there are several news articles that appear through executing a GET request. When I open one of these news articles, more information appears of the news articles. On this page there’s a “edit” news article button. On this page there are several input fields for the news article.
Now my question is: how do I prefill these input fields with information from the news article that I want to edit?
Another question is if it’s better to exectute a PUT request or a PATCH request for this case?
There might be a better option for this problem, so if you have any ideas, feel free to share!
Thanks in advance.
Posts: 1
Participants: 1
@muratcankuruoffical wrote:
example project:
import { Injectable } from '@angular/core'; interface Todo { id: string, title: string, description: string } @Injectable() export class TodoService { public todos: Todo[] = []; constructor() { // Set some test todos this.todos = [ { id: 'todo-one', title: 'Todo One', description: 'Do Stuff' }, { id: 'todo-two', title: 'Todo Two', description: 'Do Stuff' }, { id: 'todo-three', title: 'Todo Three', description: 'Do Stuff' }, { id: 'todo-four', title: 'Todo Four', description: 'Do Stuff' }, { id: 'todo-five', title: 'Todo Five', description: 'Do Stuff' }, { id: 'todo-six', title: 'Todo Six', description: 'Do Stuff' }, { id: 'todo-seven', title: 'Todo Seven', description: 'Do Stuff' } ]; } getTodo(id): Todo { return this.todos.find(todo => todo.id === id); } }
I’m project:
I can’t get data
btc.service.tsimport { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable, throwError } from 'rxjs'; import { ActivatedRoute } from '@angular/router'; import { NavController, ModalController } from '@ionic/angular'; import { Router } from '@angular/router'; interface Item { //I've tried... /* id: string, name: string, symbol: string, rank: number, price_usd: number, price_btc: number, 24h_volume_usd: number, market_cap_usd: number, available_supply: number, total_supply: number, max_supply: number, percent_change_1h: number, percent_change_24h: number, percent_change_7d: number, last_updated: number */ } @Injectable({ providedIn: 'root' }) export class BtcService { public items: Item[] = []; //items:any; constructor (public http: HttpClient) { let data:Observable<any>; data = this.http.get('https://api.coinmarketcap.com/v1/ticker/'); data.subscribe(result => { this.items = result; }); /*this.items = this.http.get('https://api.coinmarketcap.com/v1/ticker/'); this.items.subscribe(data => { console.log('my data:', data); }) */ } getItem(id): Item { return this.items.find(item => item.id === id); } }
currency.page.ts
import { Component, OnInit } from '@angular/core'; import { NavParams, NavController, ModalController } from '@ionic/angular'; import { ActivatedRoute } from '@angular/router'; import { HttpClient } from '@angular/common/http'; import { Observable, throwError } from 'rxjs'; import { BtcService } from '../btc.service'; import { Router } from '@angular/router'; @Component({ selector: 'app-currency', templateUrl: './currency.page.html', styleUrls: ['./currency.page.scss'], }) export class CurrencyPage implements OnInit { private item; constructor(private route: ActivatedRoute, private BtcService: BtcService){ } ngOnInit() { } ionViewWillEnter(){ let itemId = this.route.snapshot.paramMap.get('id'); this.item = this.BtcService.getItem(itemId); } }
home.page.html<ion-header> <ion-toolbar> <ion-title> Ionic Blank </ion-title> </ion-toolbar> </ion-header> <ion-content padding> <button full (click)="goItemPage()">Go Item Page</button> <ion-list> <ion-item [href]="'/currency/' + item.id" detail="true" *ngFor="let item of BtcService.items"> {{item.id}} </ion-item> </ion-list> The world is your oyster. <p>If you get lost, the <a target="_blank" rel="noopener" href="https://ionicframework.com/docs/">docs</a> will be your guide.</p> </ion-content>
@blondie63 , @OliverPrimo @MattE @brandyshea @mhartington
help me please easy english ım turkısh
I can’t get data detail image
Posts: 1
Participants: 1
@shaderock18 wrote:
Goal:
So I am working with a project where I created a private library in Angular and saved it to an AWS code-commit repository.
I want to install this library to my Ionic app which I can then use freely within the application via npm.
Version:
Ionic 4.2.0 (Angular build)
First Try:
I first tried to npm install it using an HTTPS Git Credentials url in the package.json which allowed me to install it locally; after putting in the appropriate credentials my libraries functionality worked the way it should. When I pushed this project to the ionic dashboard and did a build on the ionic dashboard it gave me an error clarifying that it cannot access the AWS repo.
[17:22:05]: ▸ npm ERR! [17:22:05]: ▸ npm ERR! fatal: unable to access 'https://git-codecommit.us-east-2.amazonaws.com/*url*': The requested URL returned error: 403 [17:22:05]: ▸ npm ERR!
After some thought this makes sense as there is no way for ionic to have access to a repo via HTTPS.
So I moved towards the use of SSH as Ionic has the settings of using public SSH keys.
Second Try:
I already have an Ionic SSH key setup with my Ionic pro Account where I currently have my project. So I believe that I could just copy this public key to the Amazon IAM User SSH and I should then be able to still npm install my library locally and on the ionic dashboard build.
I changed my url for the library to the SSH url in the package.json and ran an
npm install
Well the console gave me the following error locally and on the Ionic Dashboard Build:
npm ERR! Error while executing: npm ERR! /usr/bin/git ls-remote -h -t ssh://git-codecommit.us-east-2.amazonaws.com/*url* npm ERR! npm ERR! user@git-codecommit.us-east-2.amazonaws.com: Permission denied (publickey). npm ERR! fatal: Could not read from remote repository. npm ERR! npm ERR! Please make sure you have the correct access rights npm ERR! and the repository exists.
So now I cannot access it on my local machine or on ionic.
I researched a bit into this issue and the aws docs to SSH are not very helpful and ionic is also quiet on this issue.
Questions:
Is there a possibility in hooking up an Ionic Dashboard app to have access to private repos on an
npm install
without using SSH?If there is no other way except using SSH, what are some hints and steps to take to debug or perhaps clarify my public SSH key works locally?
Lastly, after it works locally, what is the best way into hooking it up with the Ionic dashboard? (Note: I already have an ssh key to grant me access to push and pull to this repo which stands alone from my Macs public ssh key. I don’t want to lose access by implementing a second ssh key.)
Posts: 1
Participants: 1
@Z3-R0 wrote:
Could somebody explane me how to implement a camera in my App?
I use Ionic 3 in VS Code.
Posts: 2
Participants: 2
@Deepak1233 wrote:
hello ,
Its freaking me out I dont know why this happens after spalsh screen ther is white screen and this is permanently stick thereI read many solutions but none of them helped or may m doing still somewhere wrong. please help me out of this
Note: when i run this into debug mode with --prod it works fine but with --release it is not working.
Here is my config.xml file … ask me else you need i ll update.
<preference name=“ScrollEnabled” value=“false” />
<preference name=“android-minSdkVersion” value=“19” />
<preference name=“BackupWebStorage” value=“none” />
<preference name=“SplashMaintainAspectRatio” value=“true” />
<preference name=“SplashShowOnlyFirstTime” value=“false” />
<preference name=“SplashScreen” value=“screen” />
<preference name=“FadeSplashScreenDuration” value=“300” />
<preference name=“SplashScreenDelay” value=“10000” />
<preference name=“AutoHideSplashScreen” value=“false” />
<preference name=“FadeSplashScreen” value=“true” />
<preference name=“ShowSplashScreen” value=“true” />and in component.ts
import { Component,ViewChild } from '@angular/core'; import { Platform,MenuController, App , NavController ,Nav,ToastController,Events} from 'ionic-angular'; import { StatusBar } from '@ionic-native/status-bar'; import { SplashScreen } from '@ionic-native/splash-screen'; import { timer } from 'rxjs/observable/timer'; import { HomePage } from '../pages/home/home'; import { IntrestsPage } from '../pages/intrests/intrests'; import { LatestPage } from '../pages/latest/latest'; import { PasswordPage } from '../pages/password/password'; import { AboutPage } from '../pages/about/about'; import { PremiummembersPage } from '../pages/premiummembers/premiummembers'; import { ManagementPage } from '../pages/management/management'; import { EditprofilePage} from '../pages/editprofile/editprofile'; import { SignupPage } from '../pages/signup/signup'; import { LoginPage } from '../pages/login/login'; import { InboxPage } from '../pages/inbox/inbox'; import { ProfilevisitorsPage } from '../pages/profilevisitors/profilevisitors'; import { ShortlistedPage } from '../pages/shortlisted/shortlisted'; import { ViewedcontactsPage } from '../pages/viewedcontacts/viewedcontacts'; import { SplitPane } from '../providers/split-pane'; @Component({ templateUrl: 'app.html' }) export class MyApp { @ViewChild('content') nav: NavController; rootPage:any = ManagementPage; // rootPage:any = HomePage; selectedMenu: any=false; selectedMenu2: any=false; img:any; fetched_info={'firstname':'','lastname':'','username':'','profilepic':'','gender':''} showSplash = true; constructor( public toast:ToastController,platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen, public app:App, public splitPane: SplitPane, public menu: MenuController,private ev:Events) { platform.ready().then(() => { this.ev.subscribe('hello', (firstname,lastname,username,profilepic,gender)=>{ this.fetched_info.firstname=firstname; this.fetched_info.lastname=lastname; this.fetched_info.username=username; this.fetched_info.profilepic=profilepic; this.fetched_info.gender=gender; }); statusBar.styleDefault(); splashScreen.hide(); setTimeout(function(){ this.showSplash = false; },3000); setTimeout(()=>{ splashScreen.hide(); },1000); }); }
Posts: 1
Participants: 1
@Vartex05 wrote:
Hi, i want to update phonegap-nfc plugin to version 1.0.3, so i can use reader mode in my app. How do i do that? Do i simply use npm install @latest on phonegap-nfc plugin? And what about the ionic native wrapper, do i have to update it also? I tried that, i install latest version of phonegap-nfc plugin and ionic-native/nfc , but now nfc in my app is broken. Any ideas how to do this update properly?
This is how my package.json looks like at the start:
{ "name": "ionic-hello-world", "author": "Ionic Framework", "homepage": "http://ionicframework.com/", "private": true, "scripts": { "clean": "ionic-app-scripts clean", "build": "ionic-app-scripts build", "ionic:build": "ionic-app-scripts build", "ionic:serve": "ionic-app-scripts serve" }, "dependencies": { "@angular/common": "5.0.0", "@angular/compiler": "5.0.0", "@angular/compiler-cli": "5.0.0", "@angular/core": "5.0.0", "@angular/forms": "5.0.0", "@angular/http": "5.0.0", "@angular/platform-browser": "5.0.0", "@angular/platform-browser-dynamic": "5.0.0", "@ionic-native/app-minimize": "^4.4.2", "@ionic-native/barcode-scanner": "^4.5.2", "@ionic-native/core": "^4.3.2", "@ionic-native/device": "^4.5.2", "@ionic-native/geolocation": "^4.3.2", "@ionic-native/native-storage": "^4.3.2", "@ionic-native/network": "^4.3.2", "@ionic-native/nfc": "^4.3.2", "@ionic-native/splash-screen": "^4.3.2", "@ionic-native/sqlite": "^4.3.2", "@ionic-native/status-bar": "^4.3.2", "@ionic/storage": "2.1.3", "android-versions": "^1.2.1", "cordova-android": "6.3.0", "cordova-plugin-appminimize": "^1.0.0", "cordova-plugin-certificates": "^0.6.4", "cordova-plugin-compat": "^1.2.0", "cordova-plugin-console": "^1.1.0", "cordova-plugin-device": "^1.1.7", "cordova-plugin-geolocation": "^2.4.3", "cordova-plugin-nativestorage": "^2.2.2", "cordova-plugin-network-information": "^1.3.4", "cordova-plugin-splashscreen": "^4.1.0", "cordova-plugin-statusbar": "^2.3.0", "cordova-plugin-whitelist": "^1.3.3", "cordova-sqlite-storage": "^2.1.2", "hex2dec": "^1.0.1", "ionic": "^3.16.0", "ionic-angular": "^3.9.2", "ionic-plugin-keyboard": "^2.2.1", "ionicons": "3.0.0", "moment": "^2.18.1", "phonegap-nfc": "^0.7.1", "phonegap-plugin-barcodescanner": "^7.0.0", "rxjs": "5.5.2", "sw-toolbox": "3.4.0", "xml2js": "^0.4.17", "zone.js": "0.8.18" }, "devDependencies": { "@ionic/app-scripts": "3.1.0", "ionic": "3.13.2", "retyped-xml2js-tsd-ambient": "0.0.0-0", "typescript": "^2.6.1" }, "cordovaPlugins": [ "cordova-plugin-whitelist", "cordova-plugin-console", "cordova-plugin-statusbar", "cordova-plugin-device", "cordova-plugin-splashscreen", "ionic-plugin-keyboard" ], "cordovaPlatforms": [], "description": "dochazka: An Ionic project", "cordova": { "platforms": [ "android" ], "plugins": { "ionic-plugin-keyboard": {}, "cordova-plugin-whitelist": {}, "cordova-plugin-console": {}, "cordova-plugin-device": {}, "cordova-plugin-geolocation": { "GEOLOCATION_USAGE_DESCRIPTION": "To locate you" }, "cordova-plugin-nativestorage": {}, "cordova-plugin-network-information": {}, "cordova-plugin-splashscreen": {}, "cordova-plugin-statusbar": {}, "cordova-sqlite-storage": {}, "phonegap-nfc": {}, "cordova-plugin-appminimize": {}, "phonegap-plugin-barcodescanner": {}, "cordova-plugin-certificates": {} } } }
Posts: 2
Participants: 2
@RajaJakkampudi wrote:
Hello everyone,
Side menu navigation only working in android KitKat version 5.1.1
But its not working in another higher versions of android and its working well in IOS.Can any one suggest me how to solve this problem.
IONIC INFO:
Ionic: ionic (Ionic CLI) : 4.10.0 (C:\Users\ADMIN\AppData\Roaming\npm\node_modules\ionic) Ionic Framework : ionic-angular 3.7.1 @ionic/app-scripts : 2.0.2 Cordova: cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1) Cordova Platforms : android 6.4.0, ios 4.5.2 Cordova Plugins : no whitelisted plugins (9 plugins total) System: Android SDK Tools : 26.1.1 (C:\Users\ADMIN\AppData\Local\Android\Sdk) NodeJS : v10.12.0 (C:\Program Files\nodejs\node.exe) npm : 6.4.1 OS : Windows 10
MANIFEST:
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Menu Code:
<ion-menu [content]="content"> <ion-header> <ion-toolbar> <ion-grid class="userGrid sideBarPad"> <ion-row justify-content-center> <ion-col col-12> <ion-label class="centeredLabel sideMenuImg no-margin"> <img src="assets/images/RedShield.png" /> <span>{{driverInfo.user.name}}</span> </ion-label> </ion-col> </ion-row> <ion-row justify-content-center> <ion-col col-12> <ion-label class="centeredLabel no-margin imcgRed imcDriver">{{driverInfo.user.opco}}</ion-label> </ion-col> </ion-row> </ion-grid> </ion-toolbar> </ion-header> <ion-content class="no-scroll menuList"> <ion-list> <button ion-item *ngFor="let p of pages" (click)="openPage(p)" class="{{p.title}} waves-effect">{{p.title}}</button> <button (click)="viewSafety()" class="Safety waves-effect">Driver Safety Portal</button> <button (click)="driverProfile()" class="profile waves-effect">Driver Profile</button> <button (click)="logOut()" class="logout waves-effect">Log Out</button> </ion-list> </ion-content> </ion-menu> <ion-nav [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>
Posts: 1
Participants: 1
@andreasTedja wrote:
Hi There,
How to display error from response API to html?
like picture attached.
let say i want to display the error code/message error using alert.thank you
Posts: 1
Participants: 1
@gaurav_ch wrote:
Hi,
updated to latest cli and I am running
ìonic lab
command. Following is the cli outputDate: 2019-01-30T11:53:51.562Z - Hash: c1a6384c5e078fc39d98 - Time: 4448ms [ng] 181 unchanged chunks [ng] chunk {intro-intro-module} intro-intro-module.js, intro-intro-module.js.map (intro-intro-module) 7.17 kB [rendered] [ng] i 「wdm」: Compiled successfully
4 seconds is too long for the refresh. It was very fast in v3. I am on Dell XPS 15 with i7, 16 GB RAM and 512GB SSD.
Posts: 1
Participants: 1
@Z3-R0 wrote:
Hi I have a working Camera in ionic 3.
How can I save a taken picture into the foto gallery of a handy.
I’m using iOS.Code cam.ts:
import { Component } from ‘@angular/core’;
import { NavController } from ‘ionic-angular’;
import { Camera, CameraOptions } from ‘@ionic-native/camera’
@Component({
selector: ‘page-home’,
templateUrl: ‘home.html’
})
export class HomePage {options: CameraOptions = {
quality: 100,
destinationType: this.camera.DestinationType.DATA_URL,
encodingType: this.camera.EncodingType.JPEG,
mediaType: this.camera.MediaType.PICTURE,
cameraDirection:0
}clickedImagePath: any;
constructor(
public navCtrl: NavController,
private camera: Camera
) {}
clickImage(){
this.camera.getPicture(this.options).then((imageData) => {
// imageData is either a base64 encoded string or a file URI
// If it’s base64 (DATA_URL):
let base64Image = ‘data:image/jpeg;base64,’ + imageData;
this.clickedImagePath = ‘data:image/jpeg;base64,’ + imageData;
}, (err) => {
// Handle error
});
}
}Thanks
If you shoot a picture it’s displayd at the cam.html
PS: Sorry for my bad english
Posts: 3
Participants: 2
@Vartex05 wrote:
Hi, has anyone tried using reader mode in nfc plugin? Iam trying to use it in my app, but it doesnt work at all, here is piece of code where i use it.
return new Promise<string>((resolve)=>{ let alert=this.alertCtrl.create({title:'Přiložte kartu:',enableBackdropDismiss: false, buttons: [{ text: 'Zrušit', role:'cancel', handler: data => { resolve(null); }}] }); alert.present(); this.nfc.readerMode(this.nfc.FLAG_READER.NFC_A,(tag)=>{ console.log("tag:"+tag); resolve(null); }, error=>{ console.log("errTag"+error); resolve(null); }); })
It shows the alert, but nothing happens when i read a tag. It also doesnt log any error. Has anyone some working example?
Posts: 1
Participants: 1
@KamayaniT wrote:
HI, I tried to install following package
but it gives following error when served,
How can I use such libraries with latest ionic version. My question is not just related to this specific library, it is regarding management of typescripts and different versions of angular
Posts: 1
Participants: 1
@basti wrote:
Hi I wanted to start a fresh ionic app, but I’m just getting this error (ionic is installed):
> npm i npm WARN deprecated circular-json@0.5.9: CircularJSON is in maintenance only, flatted is its successor. npm ERR! Unexpected end of JSON input while parsing near '...:{"strip-ansi":"^4.0.' [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 functions +2ms ionic:cli-framework:utils:process error while killing process tree for 7392: { Error: Command failed: taskkill /pid 7392 /T /F ionic:cli-framework:utils:process FEHLER: Der Prozess "7392" wurde nicht gefunden. ionic:cli-framework:utils:process ionic:cli-framework:utils:process at ChildProcess.exithandler (child_process.js:275:12) ionic:cli-framework:utils:process at emitTwo (events.js:126:13) ionic:cli-framework:utils:process at ChildProcess.emit (events.js:214:7) ionic:cli-framework:utils:process at maybeClose (internal/child_process.js:925:16) ionic:cli-framework:utils:process at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) ionic:cli-framework:utils:process killed: false, ionic:cli-framework:utils:process code: 128, ionic:cli-framework:utils:process signal: null, ionic:cli-framework:utils:process cmd: 'taskkill /pid 7392 /T /F' } +203ms ionic:cli-framework:utils:process onBeforeExit handler: error from function: { Error: Command failed: taskkill /pid 7392 /T /F ionic:cli-framework:utils:process FEHLER: Der Prozess "7392" wurde nicht gefunden. ionic:cli-framework:utils:process ionic:cli-framework:utils:process at ChildProcess.exithandler (child_process.js:275:12) ionic:cli-framework:utils:process at emitTwo (events.js:126:13) ionic:cli-framework:utils:process at ChildProcess.emit (events.js:214:7) ionic:cli-framework:utils:process at maybeClose (internal/child_process.js:925:16) ionic:cli-framework:utils:process at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) ionic:cli-framework:utils:process killed: false, ionic:cli-framework:utils:process code: 128, ionic:cli-framework:utils:process signal: null, ionic:cli-framework:utils:process cmd: 'taskkill /pid 7392 /T /F' } +12ms ionic:cli-framework:utils:process onBeforeExit handler: exiting (exit code 1) +2ms
Does anybody can help me here?
Posts: 3
Participants: 2