मेरे पास ng-repeat
तत्व है जो $http.get()
परिणाम के माध्यम से लूप होगा।कोणीय जेएस तिथि फ़िल्टर काम नहीं कर रहा
<tr ng-repeat="blog in posts">
<td style="text-align:center">{{ $index+1 }}</td>
<td>{{ blog.title }}</td>
<td>
{{ blog.author.name }}
</td>
<td>
{{ blog.created_at | date:'MMM-dd-yyyy' }}
</td>
</tr>
मैं MySQL डेटाबेस तालिका में timestamp
रूप created_at
है। और मैं angular.js v1.0.7
का उपयोग कर रहा हूं।
मुझे डीबी तालिका से एक ही आउटपुट मिल रहा है और डेट फ़िल्टर काम नहीं कर रहा है। इसे कैसे हल किया जा सकता है?
मेरे ajax कॉल,
$http({method: 'GET', url: 'http://localhost/app/blogs'}).
success(function(data, status, headers, config) {
$scope.posts = data.posts;
}).
error(function(data, status, headers, config) {
$scope.posts = [];
});
क्यों नहीं कोणीय foreach – Vignesh
@Vignesh हाँ, मुझे लगता है कि उपयोग करना चाहिए। – devo