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

Cannot retrieve name of a modal component

$
0
0

@Ritzlgrmft wrote:

I want to add some logging to all my pages. Mainly I want to log the ionViewDidEnter event. Since I need this functionality on every page, I do not want to add the component's name there hard-coded. Instead I want to use a more generic approach.

The following is working well for pages:

public ionViewDidEnter(): void {
  let viewName = this.navController.first().name;
  ...
}

However, when I add the same code to a modal's component, viewName has always the value ModalCmp.

Is there a way to retrieve the name of the modal's component generically?

Posts: 1

Participants: 1

Read full topic


Input type="number" min="0" max="10" not working

$
0
0

@jf1 wrote:

Hello all,
create a form with input type="number" min="0" max="10" field but not working in apk generated by ionic 1.3.
Is it a bug ?
thanks.

Posts: 1

Participants: 1

Read full topic

SQLite Location

$
0
0

@lucasviniciosfs wrote:

Where are SQLite databases on windows with location = default on opendatabase?
(db.openDatabase({
name: 'data.db',
location: 'default' // the location field is required
})

Posts: 1

Participants: 1

Read full topic

How display $scope.User data in console?

$
0
0

@DavidLoevy wrote:

in controller I have code:

.controller('MyAccountCtrl', function($scope,$http,BaseURL,$localStorage) {
var OnUserComplete=function(response) {
$scope.User=response.data;
}
$BuddyID=$localStorage.get('BuddyName');
$TempURL='/API/User/'+$BuddyID;
$http.get(BaseURL.concat($TempURL))
.then(OnUserComplete);
console.log($scope.User.User[0].CC); /* how can display value "$scope.User.User[0].CC"??? */
})

I try "$scope.User.User[0].CC", "$User.User[0].CC", "$scope.User.CC", ... but no success.
I have error "Cannot read property 'User' of undefined" or "undefined" (or similar).
But if I use:

console.log($scope)

it display whole "scope" object, including "User", "User[0]" and its atributtes "CC" also.
But I need having dispaly only "CC" value.
Pls some tips or ideas?

Posts: 1

Participants: 1

Read full topic

Push Notifications are not received when sent to many users at once

$
0
0

@Mephalay wrote:

Hello, I have an application available in Android market, and running on some IOS devices, it will be available in Apple App Store soon.
Whenever I send push notification to all users at once ( around 500-600 users so far ) , status of the push is marked as "enqueued" however it is not received by clients.
But If I try to send a push notification to limited number of users, say 3-5 they immediately receive the notification.
I tried to limit push to 5 users at a time, instead of making 1 request with 500 users I tried making 100 requests to ionic push services with 5 users but it doesn't work.
I am using same piece of code and same configuration when I send push notification to limited number of users, and it works; so I don't think it is a configuration problem.
Any ideas about what I am missing or doing wrong ?

Posts: 1

Participants: 1

Read full topic

Display screen according to the day

$
0
0

@Matungoo wrote:

Hi, I have to show a different screen every day.
There are a total of 8 screens that rotate. How can I do that? With setInterval?

Posts: 1

Participants: 1

Read full topic

Ion-slides don't work with the sidemenu template

$
0
0

@Lupu wrote:

Hi,

I'm using the Ionic 2 sidemenu template for Visual Studio and just replace in the second page the content with a few ion-slides. The problem is that the slides stop working in this context. Any idea what I'm doing wrong?


    <ion-slide style="background-color: green">
        <h2>Slide 1</h2>
    </ion-slide>

    <ion-slide style="background-color: blue">
        <h2>Slide 2</h2>
    </ion-slide>

    <ion-slide style="background-color: red">
        <h2>Slide 3</h2>
    </ion-slide>

</ion-slides>

Posts: 1

Participants: 1

Read full topic

Where are the ChangeLogs for upgrading from previous beta versions?

$
0
0

@GeoSys wrote:

One of our apps is currently at Beta 7, today we are trying to upgrade it to beta 11 (seems like it won't be an easy chore...), what really made things a little (or a lot) confusing, was when we tried to find the .changelog for beta 8 at Github and got a 404.

Seems like those links in the ionic blog are broken now.

:confused:

Posts: 2

Participants: 1

Read full topic


Datetime in local time

$
0
0

@jensengar wrote:

How can I show the time in local time? For example, I would expect new Date().toISOString() to show the current time relative to me, not the utc time.

Posts: 3

Participants: 2

Read full topic

How to use enableBackdropDismiss with ModalController?

Populate SQL from JSON...faster?

$
0
0

@arfons wrote:

I have a JSON I get from an API which I iterate through with some simple loops and then feed data to some SQL inserts to populate some tables, which are divided by models. The current method works like this:

.js:
...
processed_data = data.json();

if (processed_data.products) {
    for (let i = 0; i < processed_data.products.length; i++) {
        promises.push(this.product.addItemSQL(processed_data.products[i]));
    }
}
...

( I do promises.push instead of running the functions as is because I need to wait until all the inserts are done to go to the next page )
And then in the model I have the addItemSQL funciton which is just:

return this.platform.ready().then(() => {
    return this.db.query("INSERT INTO ...");
},(error) => {
});

But the result is that it's rather slow; apparently I can use transactions to speed up these inserts, but I'm unsure how.

Posts: 1

Participants: 1

Read full topic

Popover dismiss

$
0
0

@richardmarais wrote:

Hi All,

I have a popover, that takes me to another page, where I pop back to the root page (popToRoot), reload the data/dom on an event and then dismiss the popup in the promise when the json data comes back from the server. It all works fine if I have a large timeout on the dismiss.

  dismissPopup() {
    if (this.popover) {
      let that = this;
      setTimeout(function () {
        that.popover.dismiss();
      }, 500);
    }
  }

If I make the timeout too low, say 100ms, it does not dismiss because the dom is still loading.

However, I don't think having a timeout is probably the best practice. What happens if someone has a slow devise, and the time is not enough?

Can anyone please make any suggestions? Should I detect when the dom has loaded, and then call dismiss? How do I check if the dom had loaded?

Thanks

Posts: 1

Participants: 1

Read full topic

Facebook Plugin Key Hash Inconsistencies

$
0
0

@yche544 wrote:

For my app I am using facebook-connect4 plugin https://github.com/jeduan/cordova-plugin-facebook4.
I setup the project on the facebook developers page, but although i entered the android key hash I generated with the command:

keytool -exportcert -alias app_name -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64

However, only using this key hash causes an error and the login process brings up a new key hash inside the app. When I enter that one I am able to login again. Is there a reason why these two key hashes may not match up? Does this matter in the produciton version?

Posts: 1

Participants: 1

Read full topic

Adding controller to state in IonicUIRouter doesn't work

$
0
0

@Santthosh1 wrote:

.state('test.account', {
  url: '/account',
  views: {
    'tab5': {
      templateUrl: 'templates/account.html',
      controller: 'AccountController as vm'
    },
    'tab4': {
      templateUrl: 'templates/account.html',
      controller: 'AccountController as vm'
    }
  }
})

This does not bind behavior, I'm not able to access any functions within the controller in my template

Posts: 1

Participants: 1

Read full topic

‘Cordova/CDVViewController.h’ file not found in Xcode 7.3.1

$
0
0

@Hutter wrote:

Hello,

I have a problem with my application. For more than 14 hours I'm looking for...
I hope you will help me please :slight_smile:

I managed to run my application with Xcode on my iPad, this one works perfectly.

But I encounter very difficult errors :
‘Cordova/CDVViewController.h’

I looked everywhere but whatever I do, it does not correct my mistake.
Example :
add "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include" doesn't work

I even tried to recreate an ionic project ... But it changes nothing.

My configuration:
xcode : version 7.3.1
ionic : version 2.0.0
cordova : 6.3.1

EDIT : I don't have a paid developer account.

Thanks in advance :slight_smile:

Posts: 1

Participants: 1

Read full topic


Adding additional ion-input with a button

$
0
0

@DeeM52 wrote:

I am trying to add additional ion-inputs with a button.

I am getting this error with the following code below.

EXCEPTION: Error: Uncaught (in promise): Cannot assign to a reference or variable!

In the HTML file

    <ion-list>

        <!-- First attempt with the error -->
        <!-- EXCEPTION: Error: Uncaught (in promise): Cannot assign to a reference or variable! -->
        <!--
        <ion-item *ngFor="let myItem of myItemsList">
            <ion-input [(ngModel)]="myItem" type="text" placeholder="Add an item"></ion-input>
        </ion-item>
        <button small light (click)="addItem()" >Add item</button>
        -->

        <!-- Second attempt with same variable in all the ion-input -->
        <ion-item *ngFor="let myItem of myItemsList">
            <ion-input [(ngModel)]="anotherItem" type="text" placeholder="Add an item"></ion-input>
        </ion-item>
        <button small light (click)="addItem()" >Add item</button>

    </ion-list>

In the TS file

    myItemsList = [
        "First item",
        "Second item",
        "Third item"
    ];

    addItem() {
        this.myItemsList.push("");
    }

Anyone has an idea on what to do? How to achieve this?

Posts: 1

Participants: 1

Read full topic

Retrieving device tokens form Ionic Platform

$
0
0

@prz wrote:

I've just got through Ionic Push / Full Setup docs and succeeded in sending pushes via Ionic Platform. The problem comes when I try to make my own POST http request. I am obliged to pass an array of device tokens ( "tokens": ["your", "device", "tokens"] ). It seems that tokens are persisted on Ionic Platform (code taken from the tutorial):

push.saveToken(token);  // persist the token in the Ionic Platform

aren't they?
And there comes the problem I'm struggling with: in order to make my own push POST request the device tokens should be stored on my own server (am I right?). But this is what I really do not want do to. I wish I could get all the registered tokens from Ionic Platform via another http request, is it ever possible?

Posts: 1

Participants: 1

Read full topic

ngCordova Image Picker browse Favourites folder in IOS

$
0
0

@diyweb wrote:

I am using ngCordova Image Picker to browse local image file, but in IOS, the favourites folder is missing, is there any ways to include the favourites folder?

Thanks.

Posts: 1

Participants: 1

Read full topic

Getting a Session Expired (401) Error in Ionic CLI for ionic upload command

$
0
0

@semoju wrote:

I tried uploading new changes to an existing ionic 2 app and keep gettin the following message:

c:\Magaza>ionic upload
WARN: No 'upload:before' gulp task found!
If your app requires a build step, you may want to ensure it runs before upload.

Uploading app....
An error occurred uploading the build: Session expired (401). Please log in and run this command again.

Session expired (401). Please log in and run this command again. (CLI v2.0.0-beta.37)

Your system information:

Cordova CLI: 5.3.1
Gulp version: CLI version 3.9.0
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.11
Ionic CLI Version: 2.0.0-beta.37
Ionic App Lib Version: 2.0.0-beta.20
OS: Windows 8.1
Node Version: v0.12.7

Before now I've had no issues uploading. I've tried logging in via the browser but no dice. Is there a way to force a login from the CLI or otherwise? I've checked online and this situation doesn't seem to be that common.

Thanks in advance!

Posts: 3

Participants: 2

Read full topic

Property 'status' does not exist on type 'void'

$
0
0

@abengy wrote:

Please help me to solve this problem. i want to get json response from api in partnerservice file. and from my login.ts i want to get the response from service but i get this error message

this is the code
login.ts
onLogin(){
if(!this.email){
this.nav.present(this.alert('Maaf Email Belum Diisi'));
}else if(!this.password){
this.nav.present(this.alert('Maaf password belum diisi'));
}else{
let data_login = JSON.stringify({
email: this.email,
password: this.password
});
let a = this.partnerService.login(data_login);
this.nav.present(this.setloading());
if(a.status=1){
console.log('success');
}else{
console.log('error');
}

    }
  }

partnerService
login(data_login){
let url= this.apiUrl + "PartnerLogin/" + this.apiKey;
this.http.post(url, data_login)
.map(res => res.json())
.subscribe(data => {
this.data = data;
return this.data;
});

  }

Posts: 2

Participants: 2

Read full topic

Viewing all 70857 articles
Browse latest View live


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