我想使用autocomplete字段
<angucomplete-alt id="members"
placeholder="Search members"
pause="400"
selected-object="testObj"
remote-url="http://myserver.com/api/user/find?s="
remote-url-data-field="results"
title-field="firstName,surname"
description-field="email"
image-field="profilePic"
input-class="form-control form-control-small"/>
但我有几个环境,我必须使用它开发,测试等。
我想知道如何添加远程网址
remote-url="http://myserver.com/api/user/find?s="
作为变量...所以取决于我可能拥有的环境
http://my_DEV_server.com/api/user/find?s=
http://my_TEST_server.com/api/user/find?s=
由于这不同于服务器端渲染,它本来就足够/用户/查找了,如何通过此客户端渲染来解决这个问题。
由于
答案 0 :(得分:0)
这有效:
<div class="padded-row">
<div angucomplete-alt id="searchCall" placeholder="Search calls"
pause="500" selected-object="selectedCall"
remote-url="/export-proposals/rest/calls"
remote-url-data-field="call" title-field="name"
remote-url-request-formatter="remoteUrlRequestFn"
description-field="callIdentifier" minlength="3"
input-class="form-control form-control-small" match-class="highlight">
</div>
</div>