AngularJS Best Practices: ASP.NET MVC Directory Structure

时间:2021-02-12 21:50:41

/Content
----- images/ // Images for your app
----- css/ // Styles for your app
/Scripts
----- libs/ // Third-party libraries such as jQuery, Moment, Underscore, etc.
----- app/
---------- common/ // Acts as reusable components for your app
--------------- header/
-------------------- controllers/
------------------------- header.controller.js
-------------------- views/
------------------------- header.tpl.html
--------------- sidebar/
-------------------- controllers/
------------------------- sidebar.controller.js
-------------------- views/
------------------------- sidebar.tpl.html
---------- components/ // Each component is treated as a mini Angular app
--------------- users/
-------------------- controllers/
------------------------- users.controller.js
-------------------- views/
------------------------- user-list.tpl.html
------------------------- user-add.tpl.html
------------------------- user-edit.tpl.html
------------------------- user-view.tpl.html
-------------------- app.users.js
---------- app.js
/Views
----- /Home
---------- Index.cshtml
----- /Shared
---------- _Layout.cshtml
----- _ViewStart.cshtml