摘要: 添加--flat 参数,表示不创建单独的目录 例如 ng g c news/news-detail 会将文件创建在app/news/news-detail目录下 ng g c news/news-detail --flat 会将文件创建在app/news目录下 阅读全文
posted @ 2018-08-05 18:34 魔豆 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 跨域问题的环境: 在本地开发时,使用命令行ng s开启服务,访问地址为http://localhost:4200 假设调用数据接口的服务地址为http://localhost:8088/api/data.action 解决跨域问题的方法: 在angular4项目根目录下创建文件proxy.confi 阅读全文
posted @ 2018-08-05 18:13 魔豆 阅读(2979) 评论(0) 推荐(0) 编辑