2016-03-21 21 views
0

URL Paramsに基づいて異なるモジュールをブートストラップする必要があるアプリケーションを開発する必要があります。 urlにhttp:domain.com?appName = APP1がある場合はAPP1、urlにはhttp:domain.com?appName = APP2がありますがdomain.comは同じです。これをどのように実装し、最良のフォルダ構造にすることができますか?マルチモジュール角型アプリケーションの構造

背景

我々は、このための例foo-ctrl.jsとテストのためのテストを(書く、require.jsで角度JS、ノード(API)がバインド

答えて

0

間違いhttps://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#modularity - core/**/*.js // all common parts - app1/.. - - ...... - app2 - - app.js // module efinition - - config.js // defined routes/states (ui-router) - - other_module/ - - - app.js // other_module definition - - - config.js // defined routes/states (ui-router) for other_module - - - controllers/*.js || *.spec.js // file with spec.js are for tests - - - directives/*.js - - - services/*.js - - - partials/*.html // for templates - - other_module2/...

を使用していますspec.js拡張子が同じディレクトリにあるfoo-ctrl.spec.js

関連する問題