我创建一个新项目时,Angular 7不会询问是否使用路由 [英] angular 7 does not ask if to use routing when i create a new project
本文介绍了我创建一个新项目时,Angular 7不会询问是否使用路由的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我以前使用的是Angular版本6,现在已升级到7.但是,当我尝试使用ng new [app-name]
在CLI中创建新项目时,它只是在开始时不询问我是否要在我的项目或样式中包括路由
I was formerly using Angular version 6, now I have upgraded to 7. But when I try to create a new project in CLI using ng new [app-name]
it just starts without asking if I want to include routing in my project or the styling.
P.S:我拥有Angular的最新版本,即7.0.2.
P.S: I have the latest version of Angular i.e 7.0.2.
推荐答案
ng new {Project-name}
命令默认情况下会创建项目,而不会进行路由.
ng new {Project-name}
command by default creates project without routing.
在创建以下项目时需要将路由标记设置为true(默认情况下,该路由标记为false)
You need to set routing flag as true while creating project as below(by default this routing flag will be false),
ng new {Project-name} --routing=true
这篇关于我创建一个新项目时,Angular 7不会询问是否使用路由的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文