The PC-side and mobile-side under MVC, in fact no different, the same way, just two points to change them
1th: Just click anywhere on this page to determine whether it is mobile or client:
2nd: New phone-side zone areas (Simply put: areas is equivalent to a small operating mechanism also has a controller-view-and routing address), moble (where the phone is stored)
: The mechanism of MVC running is simply-controller-Main page-whether template page-returns the page you clicked
: The key point is in this template page (_layout) and the own JS,
: When we run to the (_layout) here to determine whether it is a PC or mobile phone, do not ask me why in the template page in the judgment to read this sentence
: Direct Mapping
Please put it in
Mobile-side Routing Address
Client Routing Address
Here's another question: how do I judge this route?
window.location = "/m/"; This sentence is the focus, if the current mobile phone is on the routing address, beginning with M
So how does this m define it?
The red line in the picture is running to the address of the mobile phone, see which M, that's it
There is an error in the figure if there is no accident: that is the name of the routing address in the new zone and project under the project.
Http://www.cnblogs.com/LZXX/p/5828573.html here, I'm explaining the situation.
To judge the PC and the mobile side under MVC