Software Archive
Read-only legacy content
17061 Discussions

activate_page("<#pageID>") is not working

Kamran_I_
Beginner
791 Views

Hi,

I am trying to use 'activate_page("#uib_page_1");' and I am getting ReferenceError: activate_page is not defined error in the console debug screen.

As far as I know it should work like $state.go(..) in Angular UI router .( the default router in Ionic..). Does anybody know if the activate_page("#uib_page_1") was deprecated, I saw a tutorial on Intel XDK early access and it was used in order to open new page on the screen..

Tnx

Regards,

Kamran

 

0 Kudos
4 Replies
Nick_F_2
New Contributor III
791 Views

Try this

$.mobile.changePage("#uib_page_1", {transition: "slide"});

0 Kudos
Kamran_I_
Beginner
791 Views

Thank you Nick but this didn't work, 

In debug console when I try $.mobile.changePage("##create_edtit", {transition: "slide"}) I get:

TypeError: Cannot read property 'changePage' of undefined
    at Scope.$scope.addTodo (http://127.0.0.1:58889/http-services/emulator-webserver/ripple/userapp/x/C/…9-bb2c-45be-9d9f-f088b3959a25/platforms/android/assets/www/js/app.js:34:11)
    at $parseFunctionCall (http://127.0.0.1:58889/http-services/emulator-webserver/ripple/userapp/x/C/…088b3959a25/platforms/android/assets/www/ionic/js/ionic.bundle.js:21172:18)
    at http://127.0.0.1:58889/http-services/emulator-webserver/ripple/userapp/x/C/…f088b3959a25/platforms/android/assets/www/ionic/js/ionic.bundle.js:53674:9
    at Scope.$eval (http://127.0.0.1:58889/http-services/emulator-webserver/ripple/userapp/x/C/…088b3959a25/platforms/android/assets/www/ionic/js/ionic.bundle.js:23228:28)
    at Scope.$apply (http://127.0.0.1:58889/http-services/emulator-webserver/ripple/userapp/x/C/…088b3959a25/platforms/android/assets/www/ionic/js/ionic.bundle.js:23327:23)
    at HTMLButtonElement.<anonymous> (http://127.0.0.1:58889/http-services/emulator-webserver/ripple/userapp/x/C/…088b3959a25/platforms/android/assets/www/ionic/js/ionic.bundle.js:53673:13)
    at HTMLButtonElement.eventHandler (http://127.0.0.1:58889/http-services/emulator-webserver/ripple/userapp/x/C/…088b3959a25/platforms/android/assets/www/ionic/js/ionic.bundle.js:11841:21)
    at triggerMouseEvent (http://127.0.0.1:58889/http-services/emulator-webserver/ripple/userapp/x/C/…-f088b3959a25/platforms/android/assets/www/ionic/js/ionic.bundle.js:2865:7)
    at tapClick (http://127.0.0.1:58889/http-services/emulator-webserver/ripple/userapp/x/C/…-f088b3959a25/platforms/android/assets/www/ionic/js/ionic.bundle.js:2854:3)
    at HTMLDocument.tapTouchEnd (http://127.0.0.1:58889/http-services/emulator-webserver/ripple/userapp/x/C/…-f088b3959a25/platforms/android/assets/www/ionic/js/ionic.bundle.js:2977:5) ionic.bundle.js:20434(anonymous function) ionic.bundle.js:20434(anonymous function) ionic.bundle.js:17384Scope.$apply ionic.bundle.js:23329(anonymous function) ionic.bundle.js:53673eventHandler ionic.bundle.js:11841triggerMouseEvent ionic.bundle.js:2865tapClick ionic.bundle.js:2854tapTouchEnd ionic.bundle.js:2977_simulateTouchEvent /C:/Users/Camran/AppData/Local/Intel/XDK/xdk/components/client/emulator/ripple.js:56378_translateMouseEvent 

0 Kudos
Nick_F_2
New Contributor III
791 Views

My apologies, missed the Ionic reference.

Try this page 

http://www.gajotres.net/ionic-framework-tutorial-8-page-navigation/ see if that helps.

0 Kudos
Chris_P_Intel
Employee
791 Views

activate_page should be present if you built the design with App Designer and only with certain UI frameworks. (Bootstrap, Ratchet, Ionic, TopCoat, maybe Framework7).

To get the script file that has it, you may need to bind a button to a page or sub-page.  (Using the Interactivity control in App Designer). 

0 Kudos
Reply