我的页面上有一个搜索文本框,显示结果列表onkeyup。我想在用户点击其中一个选项时重定向商店页面上的用户。所以我在选项标签中加入了ui-sref和ng-repeat;但点击回复没有任何反应 这是我的HTML代码
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-9 navbar-right visible-lg">
<form>
<div class="form-group">
<div id="custom-search-input">
<div class="input-group col-md-12">
<input type="text" class="form-control input-md label-control" placeholder="Search something..."
id="something" list="somethingelse" ng-model="search_text" ng-keyup="search(search_text)">
<span class="input-group-btn">
<button class="btn btn-info btn-lg" type="button"
tyle="background-color: #333;">
<i class="glyphicon glyphicon-search glyphicon">
<div style="font-family: 'Montserrat';display: inline"> Search</div>
</i>
<label for="something">
<datalist id="somethingelse">
<option ng-repeat="data in searchData"
value="{{data.store_name | uppercase}}"
ui-sref="store({storeName: data.store_name})">
</option>
</datalist>
</label>
</button>
</span>
</div>
</div>
</div>
</form>
</div>
这是我的app.js
.state('store', {
url: '/store/:storeName',
controller: 'StoreController',
templateUrl: 'template/store.view.html',
data: {
authenticated: false,
authorizedRoles: [USER_ROLES.all]
}
})