Ich möchte die Anzeige von Daten und zeigen auf der Webseite mit Angular Js und PHP. Ich füge meinen Code unten hinzu. Wo Daten beim Laden der Seite angezeigt werden und auch unbegrenzte Scroll-Arbeit.Datenfilter und Anzeige mit angularjs und php
HTML
<div ng-app="myApp" ng-controller="customersCtrl">
<table infinite-scroll='loadMore()' infinite-scroll-distance='2'>
<tr ng-repeat="x in names" >
<td>{{ x.package_name}}</td>
<td>{{ x.locality_city}}</td>
</tr>
</table>
\t
\t
<div class="filters"> \t
<input type="checkbox" name="type" value="1" checked /> city 1
<input type="checkbox" name="type" value="2" /> city 2
<input type="checkbox" name="type" value="3" checked /> city 3
<input type="checkbox" name="type" value="4" /> city 4
\t \t
<input type="checkbox" name="state" value="1" checked /> state 1
<input type="checkbox" name="state" value="2" /> state 2
<input type="checkbox" name="state" value="3" checked /> state 3
<input type="checkbox" name="state" value="4" /> state 4
</div>
</div>
JS
var limit = 20;
var app = angular.module('myApp',['infinite-scroll']);
angular.module('infinite-scroll').value('THROTTLE_MILLISECONDS', 250);
app.controller('customersCtrl', function($scope, $http) {
$http.get("http://localhost/ang/mysql.php", {params: { id: ids, name:'john', email:'[email protected]', limit:limit }}).then(function (response) { $scope.names = response.data.records;});
\t $scope.loadMore = function() {
\t \t limit = limit+5;
/* var last = $scope.images[$scope.images.length - 1];
for(var i = 1; i <= 12; i++) {
$scope.images.push(last + i);
}*/
\t \t $http.get("http://localhost/ang/mysql.php", {params: { id: ids, name:'john', email:'[email protected]', limit:limit }})
\t \t \t .then(function (response) {
\t \t \t \t $scope.names = response.data.records;
\t \t \t console.log(JSON.stringify(response.data));
\t \t });
\t \t
\t \t
};
});
Wie man Filter anwendet?
Ich möchte die Anzeige von Daten filtern und auf der Webseite mit Angular Js und PHP zeigen. Ich füge meinen Code unten hinzu. Wo Daten beim Laden der Seite angezeigt werden und auch unbegrenzte Scroll-Arbeit. Hier
Welchen Filter benötigen Sie? – Sravan
Filter auf Staat und Stadt –