angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Invalid blueprint: route

Open WebDesignerKits opened this issue 9 years ago • 10 comments

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

WebDesignerKits avatar Dec 22 '16 14:12 WebDesignerKits

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.

delasteve avatar Dec 22 '16 15:12 delasteve

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.

WebDesignerKits avatar Dec 22 '16 15:12 WebDesignerKits

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 avatar Dec 22 '16 18:12 hansl

@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

wilblack avatar Mar 10 '17 18:03 wilblack

ng generate --help

santivila avatar Mar 15 '17 20:03 santivila

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.

grimace avatar Mar 31 '17 15:03 grimace

There is no way to generate a route file with CLI any more? =(

SvenBudak avatar Apr 25 '17 23:04 SvenBudak

@grimace tell us how

AhHa45 avatar Jun 08 '17 14:06 AhHa45

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

SvenBudak avatar Jun 14 '17 00:06 SvenBudak

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.