代码完成/自动完成HTML中的Angular / typescript ATOM [英] Code Completion / autocomplete Angular / typescript ATOM in HTML

查看:141
本文介绍了代码完成/自动完成HTML中的Angular / typescript ATOM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有可能在Atom中获得类似的Codecompletion / Autocomplete,就像Webstorm一样。



现在我正在尝试使用打字稿,我真的很喜欢它,但真正让我恼火的是,我无法在原子中为我的HTML文件获取任何Codecompletion。



这会让我的生活如此简单....

这就是它在Webstorm(试用版)


接口非常简单:

 接口Person {
name:string;
lastName:string;
生日:号码;

$ / code>

控制器看起来像这样:

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

导出类MyCtrl {
构造函数($ scope:IMyScope){
$ scope.person.name =Lucifer;

$ b $ angular
.module('myModule')
.controller('MyCtrl',MyCtrl);

}



* .ts文件...
例如Atom:



但它没有在HTML文件中工作。
喜欢这里:



任何提示,配置问题你都可以告诉我,不胜感激!
感谢您阅读!

解决方案

原子中的一个很好的自动完成包是 Autocomplete Plus



在文档中,它链接到 providers ,你需要的是 html


I would like to know if there is any possibility to get a similar Codecompletion / Autocomplete in Atom like it is Webstorm.

Right now I am trying to get used to typescript and I really like it so far, but what really annoys me is, that I cannot get any Codecompletion in atom working for my HTML files.

That would make my life so much easier....
That is how it looks in Webstorm (trial version)

The Interface is very simple:

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

The Controller looks like that:

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);

}

It works perfectly fine in *.ts files... For example in Atom:

But it does not work in HTML files. Like here:

Any hint, configuration issues whatsoever you can tell me would be highly appreciated! Thanks for reading!

解决方案

A good autocomplete package in atom is Autocomplete Plus.

In the documentation, it links to a list of providers, the one you want is for html.

这篇关于代码完成/自动完成HTML中的Angular / typescript ATOM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆