Front-end - How to coordinate development work between multiple controllers in angular
伊谢尔伦
伊谢尔伦 2017-05-15 16:49:11
0
1
672

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.

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(1)
Peter_Zhu
  1. There are two official ways to dynamically introduce html:
<p ng-view></p>

This method requires you to configure routing to switch
Suitable for commonly used whole screen switching

<p  ng-include src='xxxx'>

xxx can be a dynamically changing address
Just bind different controllers directly to different subpages.
Applicable scenarios, switching between different pages in sub-pages.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template