昨晚略看完这本书了,看得迷迷糊糊,也看了下官方中文文档,发现第一步都是先从github上下载某个项目下来的
git clone xxxx
然后ng start,打开浏览器可以看到页面,
接下来就是按学习内容新建ts文件,写代码,刷新浏览器,然后就能看到相应的内容
这样的话如果我打算要angularjs做一个正式的项目,第一步也是要先clone github上的下来然后这个基础上开始做自己的项目的吗?
有没有不需要先git clone xxxx的angular2的教程?
个人理解,感觉angular2就是:
1, npm里装上typescript的相关东东
2,写ts文件
3,csc xxx.ts 编译生成 xxx.js
4,html页面就引用生成的xxx.js,同时再引入其他的angular2的相关js
5,在服务器上运行html页面就能看到效果,如http://localhost/index.html
伊谢尔伦2017-05-15 17:13:45
You can also write a framework yourself. The things git cloned are for your convenience. Not only the typescript part, but also to monitor changes during the development process, recompile and refresh the page, and build to merge, compress and package the code to generate a release version.
Github just helps you build the necessary environment. You don’t have to clone the official one as the basis. There are many open source projects on Github. You can find one that suits your needs, such as routing, componentization, and on-demand loading.
The open source projects on github are for your convenience, automating what you need to do manually