代码完成/自动补全 Angular/typescript 在 HTML 中的 ATOM

22

我想知道在 Atom 中是否有类似 Webstorm 的代码自动完成功能。

目前我正在尝试使用 TypeScript,并且迄今为止我非常喜欢它,但真正困扰我的是,我无法让 Atom 在我的 HTML 文件中工作自动完成功能。

如果有的话,那将使我的生活轻松得多……

这是 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文件中完美运行...例如在Atom中:enter image description here

但是在HTML文件中不起作用。就像这里一样:enter image description here

如果您能告诉我任何提示、配置问题,将不胜感激!谢谢阅读!


我认为你可以查看这个链接 - orangespark
1
你可以尝试使用 VsCode 中的这个扩展:@angular/language-service@5.0.0-beta.5 和 typescript@2.4.2 - phani indra
1个回答

4

很好的建议;但是,我们正在寻找一个支持TypeScript的HTML自动完成包,以配合相应的Angular组件。 - Trent
@Trent - 你现在使用 https://atom.io/packages/atom-typescript 吗? - jeffkmeng
是的,我正在使用 atom-typescript 包。 - Trent

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接