0
有人能纠正我如何使用这些代码吗?我知道这些不是一个工作代码。我在如何传递网址参数名称和开始日期时遇到问题。我想创建一个搜索按钮,就像输入名称“peter”,然后点击它一样。它会显示所有名称“peter”,然后显示所有名称,然后显示URL。与开始日期一样,如果你键入2015-01-01 url如何在搜索字段上设置和获取网址参数
请帮帮我吧。我不知道这些。下面的代码就像。
<!DOCTYPE html>
<html ng-app="myTable">
<head>
<title>project 43</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-rc.0/angular.min.js"></script>
<script type="text/javascript">
var myTable = angular.module('myTable', []);
myTable.controller('tableCtrl', function ($scope, $http) {
$http.get("", {headers: {Authorization: 'vuNYhXbpKfH7dxkL4h1o2etBJDEiVrRdsds'}})
.success(function (response) {
debugger
$scope.members = response.events;
$scope.totals = response.paging;
});
});
</script>
</head>
<body ng-controller="tableCtrl">
<table border="5">
<tr>
<th>Event</th>
<th>Account Shop</th>
<th>Place</th>
<th>Activity</th>
</tr>
<tr ng-repeat="member in members">
<td>
{{member.Event.name}}<br> <!--names-->
{{member.Event.id}}<br>
{{member.Event.date_start}}<br> <!--Start Date-->
{{member.Event.date_end}}<br>
<td>
{{member.AccountShop.id}}<br>
{{member.AccountShop.name}}<br>
{{member.AccountShop.short_code}}<br>
</td>
<td >
<div ng-repeat="Place in member.Place">
{{Place.id}}<br>
{{Place.name}}<br>
{{Place.lk_country_code}}<br>
</div>
</td>
<td>
<div ng-repeat="Activity in member.Activity">
{{Activity.id}}<br>
{{Activity.short_description}}
</div>
</td>
</table>
</body>
</html>
谢谢你的努力@babu pasungily。但是,我的老板想让它像获取像$ location.search()名称这样的URL参数。但我不知道它是如何工作的哈哈。我真的很感激你的努力。 :),希望你能提出更多关于dis的建议。 TNX – Jayson