Sub‐Generator: route - BlueOakJS/generator-blueoak GitHub Wiki

Description

This sub-generator will create a new AngularJS route based on the name you provide as a command line argument. It will also create associated module, controller and template files. e.g:

client/src/app/example/example.module.js
client/src/app/example/example.route.js
client/src/app/example/example.html
client/src/app/example/example.controller.js

For more information on routing, see https://github.com/angular-ui/ui-router

Usage

yo blueoak:route [-m|--module <module name>] [--uri <URI for route>] <state name>

Notes:

  1. If the route name is suffixed with 'route', the suffix will be removed since .route.js is automatically appended to the filename.
  2. If -m or --module is specified, the given argument is used as the module name. Otherwise, the module name will be taken from the current working directory if it's under client/src/app, otherwise it will be taken from <state name>.
  3. If --uri is specified, the given argument will be used as the URI for routing (the hash fragment). Otherwise, the URI will be /<state name>.

Prompts

  • none
⚠️ **GitHub.com Fallback** ⚠️