2016-06-21 23 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/這個很好,謝謝 –