Hi, all!
The new file structure is as
follows:
https://docs.google.com/document/d/1XXMvReO8-Awi1EZXAXS4PzDzdNvV6pGcuaF4Q9821Es/pub
If I use Angular not only for the "app" on my site, but also to serve
static pages (so I save a trip to the server and thereby enhance to user
experience), how should the file structure to fit the new best practice?
Below is a couple of versions of an example todo-app with static pages. How
does this look? What could be better?
projectroot/app/index.htmlapp.cssbootstrap.cssangularjs.min.jscomponents/
angular-ui-bootstrap/ui-bootstrap-0.1.0.min.jsangular-ui-router/
angular-ui-router.min.jsuser/
login/login.htmllogin.csslogin-controller.jslogin-controller_test.jsstatus/Status:
This will be the small text on the top to the right, like "Welcome, Frode -
Logout" or "You are not logged in - Log in" or "You are now logged out -
Log in again"status.htmlstatus.cssstatus-controller.js
status-controller_test.jssignup/signup.htmlsignup.csssignup-controller.js
signup-controller_test.jssettings/Change name, email or password
settings.htmlsettings.csssettings-controller.jssettings-controller_test.js
todo/ view/view.htmlview.cssview-controller.jsview-controller_test.jsedit/edit
and newedit.htmledit.cssedit-controller.jsedit-controller_test.jslist/
list.htmllist.csslist-controller.jslist-controller_test.jssidebar-nav/Some
views require a second level navigation, links to either static info
("page") or app-functionallitysidebar-nav.htmlsidebar-nav.cssstatic/
index.html
about.html
other-static-page.html
e2e/Since the site may have many static pages, and since the sidebar-nav
will be the same for several pages, perhaps a better way to organize these
files would be as below.I include also multiple languages (perhaps using
angular-translate) and more subpages for a parent page (about). Maybe this
is a good structure?index/index.htmlen.jsonno.jsonabout/sidebar.htmlCommon
sidebar-nav for all about-pages (similar would also for non-static pages,
if needed)sidebar.cssBut the sidebar-nav.css would probably be identical
and not be repeated, so this is not a good place for it...about.htmlen.json
no.jsonhistory/history.htmlen.jsonno.jsonemployees/employees.htmlen.json
no.json
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.