jquery - How to get and filter URL parameter -


i ask if how can , put url parameters of name, start date , end date under event , set on filter. assuming url name . http://staging.api.sample.com/events.json?name=johndrake , start date same link events.json/start_date_from=2015-01-01 .can have suggestions? me guys.it’s 1 week trial , error

code like:       <!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("http://staging.sample.com/events.json", {headers: {authorization:  'vunyhxbpkfh7dxks'}})      .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>     <!--end date-->       <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> 

for headers ,you can use " $http.defaults.headers.common['authorization']='vunyhxbpkfh7dxks' " instead of send same headers every time.
, can send data object
{
name:'johndrake',
start_date_from:'2015-01-01'
}
post data,they become" ?name=johndrake&start_date_from=2015-01-01 "


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -