这是一个Angular入门教程配套的代码,教程地址为:http://blog.csdn.net/column/details/17132.html
在\proxy.conf.json中配置了地址映射。
所以使用npm start
启动服务。
打开浏览器访问http://localhost:4200/
。
执行 ng generate component component-name
去创建一个新的组件。
你还可以像这样使用,创建其他的Angular元素。
ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the -prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
Before running the tests make sure you are serving the app via ng serve
.
在使用Angular CLI遇到问题可以执行 ng help
查看帮助。
在使用本代码时遭遇问题,可以到码云上提交ISS
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。