小编S S*_*S S的帖子

如何从AngularUI预先输入中清除文本

我有一个输入输入.输入文本设置为在预先输入上选择的选项.但是,我想清除此文本并在从typeahead中选择其中一个选项后再次在文本框中显示"占位符"值(因为我将所选值添加到selectMatch()方法中的另一个div .

<input id="searchTextBoxId" type="text" 
    ng-model="asyncSelected" placeholder="Search  addresses..."
    typeahead="address for address in getLocation($viewValue) | filter:$viewValue"
    typeahead-loading="loadingLocations" class="form-control"
    typeahead-on-select="selectMatch(asyncSelected)" typeahead-min-length="3"
    typeahead-wait-ms="500">
Run Code Online (Sandbox Code Playgroud)

我尝试使用其Id设置Input元素的文本值和占位符值,但这不起作用,例如:

// the input text was still the 
$('#searchTextBoxId').attr('placeholder', 'HELLO');
Run Code Online (Sandbox Code Playgroud)

选定的结果

// the input text was still the selected result
$('#searchTextBoxId').val('');
Run Code Online (Sandbox Code Playgroud)

如何设置或重置文本值?

angularjs angular-ui angular-ui-bootstrap angular-ui-typeahead

32
推荐指数
2
解决办法
2万
查看次数

如何使用maven从ivy存储库下载工件

我们正从常春藤搬到maven.我们在使用常春藤发布的工件中有很多工件,因此工件文件夹/路径结构类似于

  1. artifactory/libs-release/[organization]/[module]/[revision]/[type]s/[module](-[classifier]).[ext]

  2. artifactory/libs-release/[organization]/[module]/[revision]/[type]s/ivy.xml

但是,当我们在maven pom.xml中添加依赖项时,依赖项名称将类似于com.abc.xyz.但maven试图查看路径com/abc/xyz/文件夹,而我们在神器中有神器com.abc.xyz/my-artifact/1.0.0/jars/my-artifact.jar

我怎样才能告诉maven(pom.xml)阅读和理解神器中的路径.

我尝试使用ivy-maven-plugin,但它为一些groovy类提供classNotFound错误,即使我在我的本地m2存储库文件夹中需要groovy jar.

*回答 好,这是我们做的.我们手动创建文件夹然后我们现在使用makepom插件将ivy.xml转换为maven pom.xml感谢您提出所有建议,欢迎更多.

ivy dependency-management artifactory pom.xml maven

7
推荐指数
1
解决办法
5071
查看次数