2016-09-18 32 views
18

我想知道是否有可能在Atom中獲得類似的Codecompletion/Autocomplete,就像Webstorm一樣。代碼完成/自動完成HTML中的角度/打字稿原子碼

現在我正在嘗試使用打字稿,到目前爲止我非常喜歡它,但是真正讓我惱火的是,我無法在原子中爲HTML文件獲取任何Codecompletion。

這將使我的生活變得更輕鬆....
這就是它的外觀在Webstorm(試用版) webstorm screenshot

界面非常簡單:

interface Person { 
    name: string; 
    lastName: string; 
    birthday: number; 
} 

的控制器看起來像這樣:

module myModule { 
export interface IMyScope extends ng.IScope { 
    person: Person; 
} 

export class MyCtrl { 
    constructor($scope: IMyScope) { 
     $scope.person.name = "Lucifer"; 
    } 
} 
angular 
    .module('myModule') 
    .controller('MyCtrl', MyCtrl); 

}

它完美罰款* .ts文件... 例如,在凌: enter image description here

但它不能在HTML文件。 像這裏: enter image description here

任何提示,配置問題,無論你可以告訴我,將不勝感激! 感謝您的閱讀!

+0

我想你可以查看這個[link](https://stackoverflow.com/a/36378932/2791802) – orangespark

+1

你可以試試這個擴展名爲VsCode'@ angular/language-service @ 5.0.0-beta.5和打字稿@ 2.4.2' –

回答

3

原子中的一個很好的自動完成包是Autocomplete Plus

在文檔中,它鏈接到providers的列表,您需要的列表是html

+0

很棒的建議;不過,我們正在尋找一個HTML自動完成軟件包,它支持來自相應Angular組件的TypeScript。 – Trent

+0

@Trent - 你現在在使用https://atom.io/packages/atom-typescript嗎? – jeffkmeng

+0

是的,我正在使用'atom-typescript'軟件包。 – Trent