Navigate to pages from html

General questions about NeoAppBuilder - our rapid application development tool for building HTML5, web and mobile apps.

Moderator: Neosoft Support

Locked
otlik
Posts: 6
Joined: Fri Aug 17, 2018 1:44 am

Navigate to pages from html

Post by otlik »

Dear Forumers!

I try to put an offcanvas menu to the app with inside app page link (html and js combination), but I don't know how its possible. I tried to replace # with pagename, but no luck.
Anyone can help? Thanks!
Like this:
<ul class="dropdown-menu navmenu-nav">
<li><a href="#">Action</a></li>
</ul>

And I have an error message from fancy checkboxes when I try to define on and off states with variables, what is the problem:
Error: [$compile:ctreq] http://errors.angularjs.org/1.6.10/$com ... 1=ngChange
at W (file:///C:/ProgramData/NeoSoft/NeoAppBuilder/js/angular.min.js:76:472)
at p (file:///C:/ProgramData/NeoSoft/NeoAppBuilder/js/angular.min.js:71:195)
at f (file:///C:/ProgramData/NeoSoft/NeoAppBuilder/js/angular.min.js:62:477)
at f (file:///C:/ProgramData/NeoSoft/NeoAppBuilder/js/angular.min.js:62:494)
at p (file:///C:/ProgramData/NeoSoft/NeoAppBuilder/js/angular.min.js:71:134)
at f (file:///C:/ProgramData/NeoSoft/NeoAppBuilder/js/angular.min.js:62:477)
at f (file:///C:/ProgramData/NeoSoft/NeoAppBuilder/js/angular.min.js:62:494)
at Anonymous function (file:///C:/ProgramData/NeoSoft/NeoAppBuilder/js/angular.min.js:62:100)
at link (file:///C:/ProgramData/NeoSoft/NeoAppBuilder/js/angular-route.min.js:7:408)
at Anonymous function (file:///C:/ProgramData/NeoSoft/NeoAppBuilder/js/angular.min.js:17:108)
User avatar
luishp
Posts: 410
Joined: Wed May 23, 2007 10:17 am
Location: Spain
Contact:

Re: Navigate to pages from html

Post by luishp »

Use this syntax:
<a href="javascript:angular.element(document.getElementById('ng-view')).scope().GotoPage('PageName')">Action</a>
To simplify I allways define this on Project->Events->Start-up:
BeginJS
AppFunctions = angular.element(document.getElementById("ng-view")).scope();
EndJS
And then you can use NAB functions anywhere from javascript like this:
AppFunctions.GotoPage("PageName");
Or in this case:
<a href="javascript:AppFunctions.GotoPage('PageName')">Action</a>
Regards.
Luis Hernández - SinLios Soluciones Digitales
http://sinlios.com
otlik
Posts: 6
Joined: Fri Aug 17, 2018 1:44 am

Re: Navigate to pages from html

Post by otlik »

Big thanks Luishp!
Locked