选择样式表和路由在 "ng new" 和 Git Bash 上不起作用 - 如何解决?
Choosing stylesheet and routing doesn't work on "ng new" on Git Bash - how to fix?
我有最新版本的 angular-cli/npm/node,但是当我键入 "ng new" 时,它不会询问我是否需要路由(或哪个样式表)。
我不知道我的 Git Bash 是否有问题,这些是我的版本。
$ node -v
v12.5.0
$ npm -v
6.9.2
$ ng version
Angular CLI: 8.0.6
Node: 12.5.0
OS: win32 x64
Angular:
...
Package Version
------------------------------------------------------
@angular-devkit/architect 0.800.6
@angular-devkit/core 8.0.6
@angular-devkit/schematics 8.0.6
@schematics/angular 8.0.6
@schematics/update 0.800.6
rxjs 6.4.0
--
"ng new" 命令基本有效 - 除了询问样式和路由,我很乐意寻求帮助 :)
P.S。 - 奇怪的是:在 VS-Code 中(使用 Bash)它工作得很好。
可能是 for ng new
:
ng new --help
explains that you need to use ng new [name] --routing=true
--style
相同 (=css|scss|sass|less|styl
)
默认情况下,routing
设置为 false
,style
设置为 css
。
我有最新版本的 angular-cli/npm/node,但是当我键入 "ng new" 时,它不会询问我是否需要路由(或哪个样式表)。
我不知道我的 Git Bash 是否有问题,这些是我的版本。
$ node -v
v12.5.0
$ npm -v
6.9.2
$ ng version
Angular CLI: 8.0.6
Node: 12.5.0
OS: win32 x64
Angular:
...
Package Version
------------------------------------------------------
@angular-devkit/architect 0.800.6
@angular-devkit/core 8.0.6
@angular-devkit/schematics 8.0.6
@schematics/angular 8.0.6
@schematics/update 0.800.6
rxjs 6.4.0
--
"ng new" 命令基本有效 - 除了询问样式和路由,我很乐意寻求帮助 :)
P.S。 - 奇怪的是:在 VS-Code 中(使用 Bash)它工作得很好。
可能是ng new
:
ng new --help
explains that you need to useng new [name] --routing=true
--style
相同 (=css|scss|sass|less|styl
)
默认情况下,routing
设置为 false
,style
设置为 css
。