Page 1 of 2

Navigating to pages from select item with ionic framework

Posted: Thu Dec 31, 2015 8:17 pm
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/...


Navigating to pages from select item with ionic framework

Posted: Thu Dec 31, 2015 9:26 pm
by Serhii Kulibaba

Hello William,

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


Navigating to pages from select item with ionic framework

Posted: Thu Dec 31, 2015 10:57 pm
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?


Navigating to pages from select item with ionic framework

Posted: Fri Jan 01, 2016 3:08 pm
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();


Navigating to pages from select item with ionic framework

Posted: Mon Jan 04, 2016 6:33 pm
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?


Navigating to pages from select item with ionic framework

Posted: Mon Jan 04, 2016 7:37 pm
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.


Navigating to pages from select item with ionic framework

Posted: Tue Jan 05, 2016 7:27 am
by Serhii Kulibaba

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

instead of:
ng-click=apopka


Navigating to pages from select item with ionic framework

Posted: Tue Jan 05, 2016 4:40 pm
by William Fulton

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


Navigating to pages from select item with ionic framework

Posted: Tue Jan 05, 2016 11:32 pm
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!


Navigating to pages from select item with ionic framework

Posted: Tue Jan 05, 2016 11:33 pm
by William Fulton

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