获取angularJS autcomplete在Webstorm / PHPStorm [英] Getting angularJS autcomplete in Webstorm/PHPStorm

查看:182
本文介绍了获取angularJS autcomplete在Webstorm / PHPStorm的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要如何自动完成字符串中的angularjs语法。例如:

How do I get auto-complete for angularjs syntax in strings. For example:

myscript.js

myscript.js

var List = function ($scope) {
    $scope.names = [
        "Ahmed",
        "Tom",
        "David",
        "Jessie"
    ];
};

HTML

<div>
    <label for="get_name">
        Find your name:
        <input type="search" name="search" id="search" ng-model="search"/>
    </label>
</div>

<div ng-controller="List">
    <ul>
        <li ng-repeat="name in names | filter:search">{{ name }}</li>
    </ul>
</div>

<script type="text/javascript" src="angular_1.0.7.js"></script>
<script type="text/javascript" src="myscript.js"></script>

这基本上是搜索到名称的方式。我如何获得自动完成出现在&LT;李NG重复=名称名称|过滤器:搜索&GT; {{名}}&LT; /李&GT; NG-重复内

This is basically a way to search to names. How do I get auto-complete to appear inside <li ng-repeat="name in names | filter:search">{{ name }}</li> inside ng-repeat.

我使用PHPStorm 6.0.3。

I am using PHPStorm 6.0.3.

推荐答案

如果您还没有棱角成立,到preferences>项目设置>的JavaScript>库并添加您的角度版本。

If you don't already have angular set up, go to Preferences > Project Settings > Javascript > Libraries and add your version of angular.

至于在HTML字符串自动完成,我不认为这将与PHPStorm当前版本的情况发生,但在大多数其他地方,它应该做的伎俩。

As for autocomplete in html strings, I don't think that's going to happen with the current version of PHPStorm, but in most other places, it should do the trick.

这篇关于获取angularJS autcomplete在Webstorm / PHPStorm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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