赞
踩
根据官网新建项目。
ng new my-app
cd my-app
ng serve --open
当我们想要添加模块时,发现没有app-routing.module.ts这个文件,只有app.config.ts
app.config.ts仅存在于没有模块的应用程序中,想要用到路由模块,创建新项目时,应该用这个命令创建:
ng new my-app --no-standalone --routing --ssr=false
git上已经给出答案:https://github.com/angular/angular/issues/52751
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。