Hi,
I've been playing around with the SPA parts.
Let me explain how our app works. We are using ASP MVC / Web API on the server. We are also using Microsofts unobtrusive ajax library to load between different pages in our SPA. So when clicking a link to an entierly different page (for instance moving from Calendar to Cotacts) an ajax request is sent to the server to fetch the contents of the main content area. The request returns just the main area's HTML and that gets renderded without having to reload the surrounding menus and all the script / css files on each page change. The server is smart enough to know if its a ajax request. If its not the html for the request it returns gives out the whole layout with the menus, HTML head and everything. so a direct link to any page renders normaly, and moving within the application just uses ajax to update main content area.
So when unobtrusive ajax on a click pulls data for a new content area and renders it we also need to change the history state. We are just using vanilla History api with no legacy fallback. We were wondering if we could replace that with the router? Does it support legacy fallback is the first question? The second one is can I use the router to absolutely change an url. So no "#". The way I see it, if I haven't missed anything the router is usefull for tracking states on the current page, but not for linking multiple different pages that make up our more complex SPA.
I've been playing around with the SPA parts.
Let me explain how our app works. We are using ASP MVC / Web API on the server. We are also using Microsofts unobtrusive ajax library to load between different pages in our SPA. So when clicking a link to an entierly different page (for instance moving from Calendar to Cotacts) an ajax request is sent to the server to fetch the contents of the main content area. The request returns just the main area's HTML and that gets renderded without having to reload the surrounding menus and all the script / css files on each page change. The server is smart enough to know if its a ajax request. If its not the html for the request it returns gives out the whole layout with the menus, HTML head and everything. so a direct link to any page renders normaly, and moving within the application just uses ajax to update main content area.
So when unobtrusive ajax on a click pulls data for a new content area and renders it we also need to change the history state. We are just using vanilla History api with no legacy fallback. We were wondering if we could replace that with the router? Does it support legacy fallback is the first question? The second one is can I use the router to absolutely change an url. So no "#". The way I see it, if I haven't missed anything the router is usefull for tracking states on the current page, but not for linking multiple different pages that make up our more complex SPA.