Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 1.52 KB

api.md

File metadata and controls

48 lines (31 loc) · 1.52 KB

How to involve external library

npm install --save <external library>

Open js/fw/ext/main.js, import it, and append the module name to export array if provided.

Why Dependency Injection looks so weird in this skeleton

This is because ng-annotate is chosen for for providing quick DI.

How to add new route

You will find a Routes.js in each "feature" folder, it's an Array to be exported, and each object in it is used to describe a Route.

You can easily append more to an exist feature, or add a new feature with route.

Why main.js exist in each folder

The main.js in each folder takes the responsibility for managing all modules in that folder, according to such concept, it's more robust to extend functionality without modifying other features.

How to use jquery

npm install --save jquery

If you'd like to add jquery as replacement of jqLite, you have to modify the webpack.config.dev.js and webpack.config.prod.js with following plugin added:

new webpack.ProvidePlugin({
    $: 'jquery',
    'window.jQuery': 'jquery'
}),

This is because AngularJS internally check if window.jQuery provided

References

  1. yeoman
  2. gulp
  3. webpack
  4. es6-features
  5. angular
  6. angular-material