| Page 1 of 1 | [ 3 posts ] |
Khoa Bui
|
I am working on a single page application, and need to implement a front controller on the front-end.
With the jobs: - When user click on a toolbar icon or a menu item that would open a new page, the event will be handled by the front controller. - The front controller then do stuff like prviledge checking, .. - Call approriate function to display the view. Looking at YUI to find supporting component, I find that Y.Router is good, but the problem is that i do not want the URL change, the URL would be always http://www.myHost.com/myApp. How can I use Y.Router and keep the URL? |
Juan Ignacio DopazoYUI Contributor
|
You can use hash based URLs like http://www.myHost.com/myApp#foo/bar. That way it will still be a single page application and the user still has a URL that matches some state and the Back button of the browser still works.
You can do this by setting serverRouting to false in Y.App. |
|
Yup! This sounds like a perfect job for `Y.App`: http://yuilibrary.com/yui/docs/app/#app-component
|
| Page 1 of 1 | [ 3 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group