Use route to achieve single page jump function
Leveraging the ANGULARJS development process
1) Configure the ANGULARJS development environment.
2) Create a project directory with yo angular projectname
3) Delete some of the pages and scripts that the system automatically generates that are not needed by your project.
4) Modify the index.html in the
<!--ADD your site or application content here--
The above comments write their own style content, the key is
<div class= "Container-fluid" id= "main" style= "Float:left;width:calc (100%-240px);" >
<div ng-view= "" ></div>
</div>
Ng-view This div is a placeholder, using the Routing and Template feature will be inserted in this location HTML fragment of each page 5) need several pages, first use Yo angular:route routename to create a few routes, Yo will automatically generate the corresponding HTML and JS files, and then add the corresponding content in the corresponding file to
6) Pay attention to the function scope, which page's function, that is, the so-called instructions, it will be in their corresponding instruction JS file to write.
ANGULARJS single page routing configuration Well, it's easy to understand.