Navigating to pages from select item with ionic framework

This forum contains topics that were moved from Get Satisfaction
William Fulton
Posts: 0
Joined: Tue Feb 18, 2014 7:51 pm

Navigating to pages from select item with ionic framework

Post by William Fulton »

Hi, I am in the process of rebuilding my jquery apps to allow for better responsive look and feel in multiple formats and resolutions across mobile devices. In this process, I need to migrate my old jquery navigation code to the ionic framework but have no idea how. This is basically what I need to do, but in ionic:

https://getsatisfaction.com/apperyio/...

Serhii Kulibaba
Posts: 147
Joined: Tue Aug 27, 2013 1:47 pm

Navigating to pages from select item with ionic framework

Post by Serhii Kulibaba »

Hello William,

Please use Apperyio.navigateTo() for that: https://devcenter.appery.io/documenta...

William Fulton
Posts: 0
Joined: Tue Feb 18, 2014 7:51 pm

Navigating to pages from select item with ionic framework

Post by William Fulton »

Sergiy, thanks for the pointer. But the docs are missing a few explicit instructions, for instance, how do I call the specific function in my page? What hierarchy do I follow in the function to name the option in the select box correctly in the function?

Serhii Kulibaba
Posts: 147
Joined: Tue Aug 27, 2013 1:47 pm

Navigating to pages from select item with ionic framework

Post by Serhii Kulibaba »

You can call scope function from the html attribute, e.g.:
ng-click=myFunction()

or call it from the another function. e.g.:
$scope.myFunction();

William Fulton
Posts: 0
Joined: Tue Feb 18, 2014 7:51 pm

Navigating to pages from select item with ionic framework

Post by William Fulton »

I have created a function called apopka and defined the function as this:
Apperyio.navigateTo("Apopka", {});

I have assigned this to the properties of my select option by adding ng-click=apopka in the properties box.

This still does not function. Can you please let me know what I am doing wrong?

William Fulton
Posts: 0
Joined: Tue Feb 18, 2014 7:51 pm

Navigating to pages from select item with ionic framework

Post by William Fulton »

The problem does not seem to be the function but calling the function from within the "select" control, specifically from an option in the "select" control. Please let me know how to do this.

Serhii Kulibaba
Posts: 147
Joined: Tue Aug 27, 2013 1:47 pm

Navigating to pages from select item with ionic framework

Post by Serhii Kulibaba »

You have to use:
ng-click=apopka()

instead of:
ng-click=apopka

William Fulton
Posts: 0
Joined: Tue Feb 18, 2014 7:51 pm

Navigating to pages from select item with ionic framework

Post by William Fulton »

I've already tried this both ways and it does not work either way.

William Fulton
Posts: 0
Joined: Tue Feb 18, 2014 7:51 pm

Navigating to pages from select item with ionic framework

Post by William Fulton »

I'm going to try to be clearer of my intention so we can hopefully understand each other.

I am using a "select" component named Select1. This has around 20 options. When I select an option from this component, I want to navigate to a page associated with the option I selected. So, there will be 20 possible pages to navigate to.

I created the function named "apopka" and assigned the function to the selection option property using ng-click and setting the attribute value to "apopka()". However, this does not actually do anything.

If I assign perform this with any other component, it works. But the options of my select component do not function in the same way for some reason. Please help!

William Fulton
Posts: 0
Joined: Tue Feb 18, 2014 7:51 pm

Navigating to pages from select item with ionic framework

Post by William Fulton »

To be clearer, I am not using an HTML component.

Post Reply