2016-06-21 28 views
1

我想保留所有的代码仍然在1.x中,并且希望代码很容易升级到后者的angularjs 2。为了使我的代码遵循角2样式,我想先在1.5.x中使用typescript和systemjs。如何设置angularjs 1.5.x与systemjs和打字稿一起工作

有没有人有解决方法/如何设置angularjs 1.5.x与systemjs和typescript工作的代码?

这是我发现用巴贝尔作为编译器的最佳匹配:https://github.com/swimlane/angular1-systemjs-seed 但我想systemjs与打字稿一起工作,在角1

+0

这应该让你开始。 http://legacytotheedge.blogspot.com.au/2015/01/using-es6-with-your-angularjs-project.html – synapze

回答

1

有一些种子项目,以帮助您开始使用的角度和JSPM( ES6):

https://github.com/angularclass/NG6-starter/tree/jspm https://github.com/davinkevin/angularjs-jspm-seed

这一个是对JSPM +打字稿 https://github.com/b091/ts-skeleton/

+0

它与我想要的不符:angular1 + typescript + systemjs –

+0

jspm只是一个包装systemjs(相同的开发组)使用systemjs,所以jspm + typescript + angular 1.x非常接近你的需求 – yaarix

+0

https://github.com/b091/ts-skeleton/这个很好,谢谢 –