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

İos 11 and Android 7.0 Themeable Browser Buttons not seen


List item with round icon - first character of subject mail, like Gmail App

$
0
0

@inesgomes wrote:

I have a page, with a list containing all messages of the user and admin.
Each ion-item has an icon in the left side, with a standard envelop icon image.
It would be great to create an icon with the first character of the first word in the subject of the message.
How can I do it?
(Ionic 3)

Posts: 1

Participants: 1

Read full topic

View doesnt Update all the time

$
0
0

@lolujellyx wrote:

Hello Guys -

I am having a Problem with my View not beeing updated properly on my Angular/Ionic App

For Example: I have a tab-bar, and i clicked on the “account-tab” - my view already appeared and everything is fine- BUT my tab-bar doesnt update - it still says im on another tab (see picture)

If I Go on of the the Links at the Page and push another Page- the Tab Button updates.

Another Example:

I have an ion-input html tag with an NgModel two-way-Binding, which is [disabled] if there is no Input.
the “Submit” button should be enabled as soon as some value is provided in the input box - this does not happen!
plus you can still see the Tab-Button-Problem described above.

-> If i Click on a Button which shows a Pop-Up - the View gets Updated and everythings works correctly :

I dont think there is any mistake with data-binding or HTML etc. This is a Problem with View Updating and Angular-Zone, cause i did this as an Example:

" this._zone.run(function() {
that.showGroup = !that.showGroup;
that.displayIcon();
});"

if I change Properties inside this zone.run function - my view gets updated properly!! - otherwise is does not or not all the time.

BUT I Dont want to use zone.run all the time!
I need a generic solution

My Package:

“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/barcode-scanner": “4.3.1”,
"@ionic-native/camera": “^4.2.1”,
"@ionic-native/core": “3.12.1”,
"@ionic-native/date-picker": “^4.3.1”,
"@ionic-native/google-plus": “^4.3.0”,
"@ionic-native/splash-screen": “3.12.1”,
"@ionic-native/status-bar": “3.12.1”,
"@ionic-native/keyboard": “4.3.2”,
"@ionic/storage": “2.0.1”,
“angularfire2”: “^5.0.0-rc.3”,
“cordova-android”: “^6.0.0”,
“cordova-browser”: “^4.1.0”,
“cordova-plugin-camera”: “^2.4.1”,
“cordova-plugin-compat”: “^1.1.0”,
“cordova-plugin-console”: “^1.0.5”,
“cordova-plugin-datepicker”: “^0.9.3”,
“cordova-plugin-device”: “^1.1.4”,
“cordova-plugin-googleplus”: “^5.1.1”,
“cordova-plugin-splashscreen”: “^4.0.3”,
“cordova-plugin-statusbar”: “^2.2.2”,
“cordova-plugin-whitelist”: “git+https://github.com/apache/cordova-plugin-whitelist.git”,
“firebase”: “^4.6.0”,
“ionic-angular”: “3.6.0”,
“ionic-plugin-deeplinks”: “^1.0.14”,
“ionic-plugin-keyboard”: “^2.2.1”,
“ionicons”: “3.0.0”,
"@ionic-native/fcm": “4.3.2”,
“phonegap-plugin-barcodescanner”: “^6.0.0”,
“rxjs”: “5.4.0”,
“sw-toolbox”: “3.6.0”,
“cordova-plugin-fcm”: “^2.1.2”,
“zone.js”: “0.8.18”
},
“devDependencies”: {
"@angular/cli": “^1.4.2”,
"@ionic/app-scripts": “2.1.4”,
“typescript”: “2.3.4”
},

Thanks for your answers :slight_smile:

Posts: 1

Participants: 1

Read full topic

Ionic web service: WSDL

iPhone X Lower Navbar UI Suggestions?

$
0
0

@EvanW wrote:

Hey everyone - I’m trying to make sure everything is up-to-date for the iPhone X release next Friday, and I’m not 100% sure how I should work around my app’s navigation and the new ‘home bar’ at the bottom of the screen.

Currently I have a 3-segment navbar with page forward/back navigation and the middle returns to the lesson list/menu, as seen in the picture below.

Running in the simulator, the home bar directly overlaps the menu portion of the segment. It’s still tappable, but clearly not an ideal placement.

Does anyone have any suggestions for how I could work around this UI/UX issue?

Thanks!

Posts: 1

Participants: 1

Read full topic

Runtime Error Object prototype may only be an Object or null: undefined Ionic3

$
0
0

@k4dy wrote:

I try to run my ionic application and then I got this error.

Runtime Error Object prototype may only be an Object or null: undefined

TypeError: Object prototype may only be an Object or null: undefined
    at setPrototypeOf (<anonymous>)
    at __extends (http://localhost:8100/build/vendor.js:78206:9)
    at http://localhost:8100/build/vendor.js:78303:5
    at Object.<anonymous> (http://localhost:8100/build/vendor.js:78308:2)
    at __webpack_require__ (http://localhost:8100/build/vendor.js:55:30)
    at Object.268 (http://localhost:8100/build/main.js:58:79)
    at __webpack_require__ (http://localhost:8100/build/vendor.js:55:30)
    at Object.263 (http://localhost:8100/build/main.js:43:70)
    at __webpack_require__ (http://localhost:8100/build/vendor.js:55:30)
    at webpackJsonpCallback (http://localhost:8100/build/vendor.js:26:23)

this my environment:-

Ionic Framework: 3.7.1

Ionic App Scripts: 3.0.1

Angular Core: 4.4.3

Angular Compiler CLI: 4.4.3

Node: 6.11.4

I tried to solve this problem by uninstalling npm, ionic, all cordova plugins and reinstall them.

the big problem is I cannot understand where is the error and what is the part which makes this error !!??

My Package.json

 {
  "name": "HC-Mall",
  "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.4.3",
    "@angular/compiler": "4.4.3",
    "@angular/compiler-cli": "4.4.3",
    "@angular/core": "4.4.3",
    "@angular/forms": "4.4.3",
    "@angular/http": "4.4.3",
    "@angular/platform-browser": "4.4.3",
    "@angular/platform-browser-dynamic": "4.4.3",
    "@ionic-native/core": "4.3.2",
    "@ionic-native/splash-screen": "4.3.2",
    "@ionic-native/status-bar": "4.3.2",
    "@ionic/storage": "2.0.1",
    "ionic-angular": "3.7.1",
    "ionicons": "3.0.0",
    "rxjs": "5.4.3",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.18",
    "cordova-plugin-ionic-webview": "^1.1.11",
    "cordova-plugin-ionic": "~2.0.1",
    "com.telerik.plugins.nativepagetransitions": "~0.6.5",
    "cordova-plugin-console": "~1.1.0",
    "cordova-plugin-device": "~1.1.4",
    "cordova-plugin-facebook4": "~1.9.1",
    "cordova-plugin-inappbrowser": "~1.7.1",
    "cordova-plugin-splashscreen": "~4.0.3",
    "cordova-plugin-statusbar": "~2.2.3",
    "cordova-plugin-whitelist": "~1.3.1",
    "cordova-plugin-x-socialsharing": "~5.2.1",
    "ionic-plugin-keyboard": "~2.2.1",
    "phonegap-plugin-push": "~2.1.0",
    "cordova-android": "~6.3.0"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.0.1",
    "typescript": "2.3.4"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-ionic": {
        "APP_ID": "abcd1234",
        "CHANNEL_NAME": "Master",
        "UPDATE_METHOD": "auto",
        "locator": "phonegap-plugin-push"
      },
      "com.telerik.plugins.nativepagetransitions": {},
      "cordova-plugin-console": {},
      "cordova-plugin-device": {},
      "cordova-plugin-facebook4": {
        "APP_ID": "119928665301467",
        "APP_NAME": "myApplication"
      },
      "cordova-plugin-inappbrowser": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-x-socialsharing": {},
      "ionic-plugin-keyboard": {},
      "phonegap-plugin-push": {},
      "cordova-plugin-ionic-webview": {}
    },
    "platforms": [
      "android"
    ]
  }
}

My config.xml

<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.starter" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>MyApp</name>
    <description>An awesome Ionic/Cordova app.</description>
    <author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
    <content src="index.html" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <preference name="ScrollEnabled" value="false" />
    <preference name="android-minSdkVersion" value="16" />
    <preference name="BackupWebStorage" value="none" />
    <preference name="SplashMaintainAspectRatio" value="true" />
    <preference name="FadeSplashScreenDuration" value="300" />
    <preference name="SplashShowOnlyFirstTime" value="false" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="3000" />
    <platform name="android">
        <allow-intent href="market:*" />
        <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
        <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
        <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
        <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
        <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
        <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
        <splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
        <splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
        <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
        <splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
        <splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
        <splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
        <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
        <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
        <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
        <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
        <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
        <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
        <resource-file src="google-services.json" target="google-services.json" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
        <icon height="57" src="resources/ios/icon/icon.png" width="57" />
        <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
        <icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
        <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
        <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
        <icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
        <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
        <icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
        <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
        <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
        <icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
        <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
        <icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
        <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
        <icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
        <icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
        <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
        <icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
        <icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
        <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
        <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
        <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
        <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
        <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
        <splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
        <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
        <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
        <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
        <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
        <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
        <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
        <splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
        <resource-file src="GoogleService-Info.plist" />
    </platform>
    <engine name="android" spec="~6.3.0" />
    <plugin name="cordova-plugin-ionic" spec="~2.0.1">
        <variable name="APP_ID" value="abcd1234" />
        <variable name="CHANNEL_NAME" value="Master" />
        <variable name="UPDATE_METHOD" value="auto" />
    </plugin>
    <plugin name="com.telerik.plugins.nativepagetransitions" spec="~0.6.5" />
    <plugin name="cordova-plugin-console" spec="~1.1.0" />
    <plugin name="cordova-plugin-device" spec="~1.1.4" />
    <plugin name="cordova-plugin-facebook4" spec="~1.9.1">
        <variable name="APP_ID" value="119928665301467" />
        <variable name="APP_NAME" value="myApplication" />
    </plugin>
    <plugin name="cordova-plugin-inappbrowser" spec="~1.7.1" />
    <plugin name="cordova-plugin-splashscreen" spec="~4.0.3" />
    <plugin name="cordova-plugin-statusbar" spec="~2.2.3" />
    <plugin name="cordova-plugin-whitelist" spec="~1.3.1" />
    <plugin name="cordova-plugin-x-socialsharing" spec="~5.2.1" />
    <plugin name="ionic-plugin-keyboard" spec="~2.2.1" />
    <plugin name="phonegap-plugin-push" spec="~2.1.0" />
    <plugin name="cordova-plugin-ionic-webview" spec="^1.1.11" />
    <plugin name="phonegap-plugin-push" spec="2.0.0" />
</widget>

My app.component.ts

import { Component, ViewChild } from '@angular/core';
import { Nav, Platform } from 'ionic-angular';
import { StatusBar, Splashscreen } from 'ionic-native';
import firebase from 'firebase';
import {Push,PushToken} from '@ionic/cloud-angular';

// import { CategoriesPage } from '../pages/categories/categories';
// import { PromoListPage } from '../pages/promolist/promolist';
// import { SellersPage } from '../pages/sellers/sellers';
// import { NewsPage } from '../pages/news/news';
// import { AboutPage } from '../pages/about/about';
// import { LoginPage } from '../pages/login/login';
// import { locationPage } from '../pages/location/location';

@Component({
  templateUrl: 'app.html'
})
export class MyApp {
  @ViewChild(Nav) nav: Nav;
  public registered:any;
  rootPage: any;

  appPages: Array<{title: string, component: any, icon : any}>;

  constructor(public platform: Platform, public push: Push) {
    this.registered=localStorage.getItem("registered");
    firebase.initializeApp({
      apiKey: "AIzaSyDmdWszJ66QcV5rBC5co_Rnx60CgaZWcpM",
      authDomain: "udesign-1479985220086.firebaseapp.com",
      databaseURL: "https://udesign-1479985220086.firebaseio.com",
      storageBucket: "udesign-1479985220086.appspot.com",
      messagingSenderId: "434114141360"
    });
    // if(this.registered){
    //   this.rootPage=CategoriesPage;
    // }
    // else{this.rootPage=LoginPage;}
    //  platform.ready().then(() => {
    //   this.push.register().then((t: PushToken) => {
    //     return this.push.saveToken(t);
    //   }).then((t: PushToken) => {
    //     console.log('Token saved:', t.token);
    //   });
    //   this.push.rx.notification()
    //   .subscribe((msg) => {
    //     alert(msg.title + ': ' + msg.text);
    //   });
    //   StatusBar.styleDefault();
    //   Splashscreen.hide();
    // });

    // this.appPages = [
    //   { title: 'Home', component: CategoriesPage, icon: 'home'},
    //   { title: 'About HC Mall', component: AboutPage, icon: 'information-circle'},
    //   { title: 'Brands', component: SellersPage, icon: 'list'},
    //   { title: 'Promotions', component: PromoListPage, icon: 'pricetags'},
    //   { title: 'News', component: NewsPage, icon: 'paper'},
    //   { title: 'Contact Us', component: locationPage, icon: 'pin'}
    // ];

  }




  openPage(page) {
    this.nav.setRoot(page.component);
  }
}

Posts: 1

Participants: 1

Read full topic

Writefile not working

$
0
0

@Gecko98 wrote:

Hello Everybody,
I am new to working with Ionic and I need help.
My code is still not working.

I would like to save data in a Datafile.

My first step:
$ ionic cordova plugin add cordova-plugin-file
$ npm install --save @ionic-native/file

In app module.ts
providers: [
StatusBar,
SplashScreen,
File,
{provide: ErrorHandler, useClass: IonicErrorHandler},

After that in mitglied.ts
import { File } from ‘@ionic-native/file’;

constructor(public navCtrl: NavController, public navParams: NavParams, private alertCtrl: AlertController, public file: File) {
}

My method
close(){

this.file.writeFile(this.file.externalRootDirectory, ‘mydir.txt’, ‘Test’ ,{ replace: false, append: true });

}

Thank you for your support :wink:

Posts: 1

Participants: 1

Read full topic

Some Creator components are missing

$
0
0

@Alaing wrote:

Heeeeey,
New and happy to be here.
I am evaluating Creator and Ionic-Pro in general.
I realized that some components like “Button Bar” and “HTML” are missing and I can not add them to create my first demo app. Is it related to version 3.x? since the CSS also is not setup yet for ver 3.x as the system messages. Is it related to limitation of my subscription?
Is there more limitations for ver 3.x in other Pro services as well?
Thanks

Posts: 1

Participants: 1

Read full topic


Transparent image not being transparent

$
0
0

@jicee13 wrote:

I’m trying to put an image on my login page to make it look decent. The image is transparent however when I put it in my ionic app it has a background, in this case the background appears grey against the default white app background. Any suggestions on how to make the image appear transparent in ionic?

I just used a simple ion-img tag. any help is appreciated. I attached the image file too.

<ion-img height="150" src="../../assets/picture.png"></ion-img>


Posts: 3

Participants: 2

Read full topic

iPhone X Splashscreen Error

Not performing Ionic build for project type: ionic1. > cordova build ios

$
0
0

@ryanj wrote:

I am struggling to get a build of an Ionic 1 project.

I renamed my ionic.project to ionic.config.json

I can run Ionic serve and that app starts, but it wont go past the intro screen. The same goes for running it the simulator or actual device. Debugging shows no errors at all.

Any suggestions are appreciated.

li packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.14.0
ionic (Ionic CLI) : 3.14.0

global packages:
cordova (Cordova CLI) : 7.1.0

local packages:
Cordova Platforms : ios 4.5.2
Ionic Framework : ionic1 1.1.1

System:
ios-deploy : 1.9.2
Node : v6.11.4
npm : 3.10.10
OS : macOS Sierra
Xcode : Xcode 9.0.1 Build version 9A1004

Misc:
backend : pro

Posts: 1

Participants: 1

Read full topic

IONIC native HTTP - array in body POST request (JSON error)

$
0
0

@joterito wrote:

I’m trying to send a JSON array as parameter using HTTP native with IONIC 3. This is the request:

HTTPResponse = await this.http.post(url,
body, headers);
This is the complete code. I’m using HTTP from from ‘@ionic-native/http’. This is the complete code

import { HTTP, HTTPResponse } from ‘@ionic-native/http’;

[…]

let body = ‘[{“userId”: 1, “timestamp”:“2018-10-12T18:00:00.000+02”,
“audit”:“MENUTEST”},{“userId”: 1, “timestamp”:“2018-10-
12T18:00:00.000+02”, “audit”:“MENUTEST”},{“userId”: 1,
“timestamp”:“2018-10-12T18:00:00.000+02”, “audit”:“MENUTEST”}]’;

//Auth header
let headers = { Authorization: Bearer ${token}};

let httpResponse: HTTPResponse = await
this.http.post(URL_data, JSON.parse(body), headers);
I’m using similar code with other request and all is going fine, the only difference is that the request that is going have a simple parameters in JSON body. This is the request that is going fine:

import { HTTP, HTTPResponse } from ‘@ionic-native/http’;

[…]

let body = ‘{ “username”: “usuario.prueba1”, “password”: "’ +
Md5.hashStr(‘prueba’) + ‘", “customerCode”: “1234DEV” }’;

let httpResponse: HTTPResponse = await
this.http.post(URL_login, JSON.parse(body), headers);

Posts: 1

Participants: 1

Read full topic

First "git push ionic master" error

$
0
0

@jloy3 wrote:

Hi,

Following the setup tutorial, I’m trying to push my repo for the first time using git push ionic master but it keeps failing with the error:

error: update_ref failed for ref ‘refs/remotes/ionic/master’: cannot lock ref ‘refs/remotes/ionic/master’: unable to create directory for .git/refs/remotes/ionic/master

Do you have any idea on how to solve that?

Thank you!

Posts: 1

Participants: 1

Read full topic

Botones dinamicos en el Header

$
0
0

@pbsilvab wrote:

Quiero hacer un Header global en el cual los botones de acciones que esten dentro de el cambien dinamicamente correspondiendo con la pagina que este actualmente activa

Posts: 1

Participants: 1

Read full topic

Getting Invalid Bundle. Using Ionic Pro

$
0
0

@Postma wrote:

ERROR ITMS-90596: “Invalid Bundle. The asset catalog at ‘Payload/Coordinated Shopping.app/Assets.car’ can’t be read. Try rebuilding the app with a non-beta version of Xcode and submit it again.”

Any ideas what I can try?

Posts: 1

Participants: 1

Read full topic


WP rest api only listing 1 post

$
0
0

@perenyitamas wrote:

Hello!

I am trying to show all my posts from my wordpress website. Currently there are 2 posts, you can see it in the json file:
View

export class HomePage {
url: string = ‘http://feederhorgasz.000webhostapp.com/wp-json/wp/v2/posts?_embed?filter[orderby]=date&order=asc’;
items: any;

constructor(public navParams: NavParams,public navCtrl: NavController, private http:Http) {

console.log('Passed params', navParams.data);

}
ionViewDidEnter() {
this.http.get( this.url )
.map(res => res.json())
.subscribe(data =>
{
this.items = data;
console.log(“átadott wp api”,data);

    });

}

However when i am trying to read from the json, it is listing only one object. (i can see it in the log)

Posts: 1

Participants: 1

Read full topic

Quick question - scope of a Page/Component

$
0
0

@asamarcos wrote:

Hi folks,

Imagine you have two pages, each has it’s own folder and files, like this:

  • page-one
    — one.ts
    — one.html
    — one.scss
  • page-two
    — two.ts
    — two.html
    — two.scss

Let’s say one.ts has a property, like this:

export class SelectiveSyncPage {

    public types: Array<any> = [];

...

Why is it that I can, from two.html, reference the property types in one.ts ? Shouldn’t it be out of its scope?

I saw this in ionic3-components starter.
ionic3-components
app.html has this on line 62
<img class="user-avatar round" [src]="chosenPicture || placeholder" onerror="this.src='assets/img/avatar/girl-avatar.png'"

But app.component.ts has no mention of that property. Another page does. Is this broken? Or it works?

Posts: 1

Participants: 1

Read full topic

IONIC 3 and jsPDF , using FILE Transfer to download pdf not working

$
0
0

@suubcs wrote:

Hello guys, i want to use jsPDF library with IONIC3 to download PDF , i have created a simple document and when i try to download it with the default function from jsPDF doc.Save() it work in my browser , but in a real device won’t work.
So i decided to use FileTransfer Plugins from IONIC native , i have firstly created a blob File from jsPDF output , then i tried to use the writeFile() function from IONIC FILE plugin to create a new file from the blob , then i tried to download that file using Download() function from FileTransfer , Here is my code :
`

createPdf(){
    const fileTransfer: FileTransferObject = this.transfer.create();
    //Initialize jsPdf
    let doc = new jsPDF();
    doc.setFontStyle('Bold');
    doc.setFontSize(14);
    doc.text('Testing PDFs', 20, 20);
    // doc.save("example.pdf") This is the default way to download pdf In jsPDF , but it's not working in ionic
    // So Here i create new File from the blob
    let blob = doc.output('blob', {type: 'application/pdf'});
    this.file.writeFile(this.file.dataDirectory,"example.pdf",blob)
    .then((value)=>{
              console.log("File created successfly" + value);
              // if The file successfuly created , i want to download it
              fileTransfer.download( this.file.dataDirectory+"example.pdf" ,this.file.dataDirectory+"example.pdf")
                .then((entry)=>{
                  console.log("Download Success : " , entry);
                })
                .catch((error)=>{
                      console.log("Error when downloading file : " ,error);
                })
    })
    .catch((error)=>{
      console.log("Error creating File");
    });
)

`

if i look to my output console everything work ok , but nothing Happen !!

[19:50:26] console.log: File created successfly{“isFile”:true,“isDirectory”:false,“name”:“example.pdf”,“fullPath”:"/example.pdf",“filesystem”:"<FileSystem:
files>",“nativeURL”:"file:///data/user/0/io.ionic.starter/files/exam

[19:50:26] console.log: Download Success :
{“isFile”:true,“isDirectory”:false,“name”:“example.pdf”,“fullPath”:"/example.pdf",“filesystem”:"<FileSystem:
files>",“nativeURL”:“file:///data/user/0/io.ionic.starter/files/example.pdf”}

Posts: 1

Participants: 1

Read full topic

Ionic oneSignal Icon

$
0
0

@codiqa100078139 wrote:

Hi

I flowed the oneSignal documentation but when I send a push notification I don’t get it with the application Icon.

Can any one add a full step by step documentation for the implementation of the icons?

Thank you.

Posts: 1

Participants: 1

Read full topic

About the Ionic Pro category

$
0
0

@max wrote:

(Replace this first paragraph with a brief description of your new category. This guidance will appear in the category selection area, so try to keep it below 200 characters. Until you edit this description or create topics, this category won’t appear on the categories page.)

Use the following paragraphs for a longer description, or to establish category guidelines or rules:

  • Why should people use this category? What is it for?

  • How exactly is this different than the other categories we already have?

  • What should topics in this category generally contain?

  • Do we need this category? Can we merge with another category, or subcategory?

Posts: 1

Participants: 1

Read full topic

Viewing all 71027 articles
Browse latest View live


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