http://jsfiddle.net/p2227/fUzKX/3/
I feel like someone should have asked, but I couldn’t find it in the search.
As shown in the example, the data is very simple, and this is how the business is now.
1. First of all, one layer of view has been used, but now there are many layers of business in one layer of view, which we call sub-business ABCD
2. It turns out that ABCD was made by different people when we designed it, so it was an independent HTML and independent control
3. So I made another big control0, including each control, and used switch to switch. I found it easy to use, such as the sample code
4. The problem now is that each page turns out to be independent HTML. Oh, can you load the HTML by specifying the URL (specify an attr of p in ng-controller="ctrl1", or other methods)? This way you don’t have to mechanically copy and paste everyone’s original HTML
5. The project contains requirejs and should be available.
This method requires you to configure routing to switch
Suitable for commonly used whole screen switching
xxx can be a dynamically changing address
Just bind different controllers directly to different subpages.
Applicable scenarios, switching between different pages in sub-pages.