Invalid blueprint: route
I have a brand new install of the Angular CLI, and the route command isn't working.
OS
Mac OSX El Capitan
Version
angular-cli: 1.0.0-beta.24 node: 6.8.1 os: darwin x64 @angular/common: 2.4.1 @angular/compiler: 2.4.1 @angular/core: 2.4.1 @angular/forms: 2.4.1 @angular/http: 2.4.1 @angular/platform-browser: 2.4.1 @angular/platform-browser-dynamic: 2.4.1 @angular/router: 3.4.1 @angular/compiler-cli: 2.4.1
Repro steps.
ng new test-app cd test-app ng serve (then in new terminal inside test-app) ng g route home
(also tried ng generate route home, same failure)
The log given by the failure.
Invalid blueprint: route
Routes are no longer valid blueprints. See https://github.com/angular/angular-cli#generating-a-route for more information.
See https://github.com/angular/angular-cli#generating-components-directives-pipes-and-services for a list of blueprints supported by the CLI.
Ok.
The https://cli.angular.io/reference.pdf from the CLI Commands tab on https://cli.angular.io homepage doesn't reflect this status on routes yet.
Yeah the reference will heavily change in the upcoming month or 2. We're working on the documentation as we're getting more stable. In the meantime, it's suggested to use ng help.
@hansl I ran ng help to look at the generate docs. They weren't very helpful. Where are the list of 'blueprints'?
ng generate <blueprint> <options...>
Generates new code from blueprints.
aliases: g
--dry-run (Boolean) (Default: false) Run through without making any changes.
aliases: -d, --dryRun
--verbose (Boolean) (Default: false) Adds more details to output logging.
aliases: -v, --verbose
ng generate --help
I'm just getting started. I looked through the referenced links and don't get it. Some of the references still talk about generating a route, but it looks like it's not possible. Are routes deprecated?
NM: managed to navigate my way through it.
There is no way to generate a route file with CLI any more? =(
@grimace tell us how
I Found this: https://github.com/angular/angular-cli/wiki/generate-module
ng generate module --routing
or when you create a new project, and want direkt a routing file includet:
ng new app-name --routing
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.