I'm currently using React/ReactRouter/Redux. The main issue is for web2py to serve the same view wherefrom the javascript determines what other requests to make and what to render. Now if I have controller file controllers/default.py Then I go to default/page This doesn't work if there's no `page` function in default.py and if there isn't a page.html file the views folder. For the SPA I need it to just serve a single HTML file regardless of the url components after "default/". I suppose I could use the # fragment: default#/page
On Thursday, March 15, 2018 at 12:32:40 PM UTC+1, Massimiliano wrote: > > If I understand correctly what you mean, you need an entrypoint that could > be index in your controller that load the view. > Now from the view you get and set data via ajax from/to other controller > functions. > > SPA are heavly javascript based. > > Take a look on discussions on Vue.js > > On Thu, Mar 15, 2018 at 11:53 AM, Ur. Kr. <urban....@gmail.com > <javascript:>> wrote: > >> Would also need a way to redirect to "index" controller instead of >> getting "invalid controller" when navigating to a URL without a controller. >> >> >> On Thursday, March 15, 2018 at 11:28:33 AM UTC+1, Ur. Kr. wrote: >>> >>> If you want to convert part of a web2py app into an SPA with client-side >>> routing, how do you make web2py serve the same view for multiple urls? >>> >> -- >> Resources: >> - http://web2py.com >> - http://web2py.com/book (Documentation) >> - http://github.com/web2py/web2py (Source code) >> - https://code.google.com/p/web2py/issues/list (Report Issues) >> --- >> You received this message because you are subscribed to the Google Groups >> "web2py-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to web2py+un...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Massimiliano > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.