Error with Angular-CLI, when generating run ng generate route

0

I'm following an angular-cli tutorial of angular2 that indicates executing the following command:

ng generate route dashboard 

But when I execute it, I get the following error:

Invalid blueprint: route

Is there an automatic way to generate routes in angular?

The version of my angular-cli, when I execute

$ ng version
    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _' | | | | |/ _' | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
@angular/cli: 1.0.0-rc.1
node: 7.2.1
os: darwin x64
@angular/common: 2.4.8

@angular/compiler: 2.4.8
@angular/core: 2.4.8
@angular/forms: 2.4.8
@angular/http: 2.4.8
@angular/platform-browser: 2.4.8
@angular/platform-browser-dynamic: 2.4.8
@angular/router: 3.4.8
@angular/cli: 1.0.0-rc.1
@angular/compiler-cli: 2.4.8

$ ng generate route dashboard
Invalid blueprint: route
    
asked by Pablo Ezequiel 06.03.2017 в 00:23
source

2 answers

1

You can not, this was disabled with the output of the new router a few months ago and the angular-cli developers have not yet implemented it:

    
answered by 06.03.2017 / 01:58
source
1

This function was disabled as the KarlosCode says in beta versions. However, the second Release Candidate has already left (the 1.0.0-rc.1) and is already enabled again. I recommend that you update as future versions will not contain changes that could break anything in your project. I have already updated my projects and I have not had any problems.

Here you can find more info about update and about changes made in Angular CLI.

    
answered by 07.03.2017 в 09:30