I am following the tutorial on nettuts Building a Web App From Scratch in AngularJS but using my own json call from google spreadsheet. Except the search filter doesn't seem to be working.
EDIT: Based on feedback, here is simplified example
app.controller("mainController", function($scope, $http){
$scope.results = [];
$scope.filterText = null;
$scope.init = function() {
var sheet = "od6"; //upcoming classes
var key = "0AhVWrVLsk5a5dDJyaW1LMXFEVk1UY0FPVlBVcHd1bGc";
var url = "http://spreadsheets.google.com/feeds/list/" + key + "/" + sheet + "/public/values?alt=json-in-script";
$http.jsonp(url + '&callback=JSON_CALLBACK').success(function(data) {
angular.forEach(data, function(value, index){
angular.forEach(value.entry, function(classes, index){
$scope.results.push(classes);
});
});
}).error(function(error) {
});
};
});
After that it seems to be fairly easy to set up, just like:
<input type="text" ng-model="filterText" placeholder="Enter text here">
<ul>
<li ng-repeat="classes in results | filter:filterText>
<h3>{{classes.gsx$title.$t}}</h3>
<p>{{classes.gsx$description1.$t}}</p>
<ul>
<li><strong>Start:</strong> {{classes.gsx$start.$t}} </li>
<li><strong>End:</strong> {{classes.gsx$finish.$t}} </li>
<li><strong>Price:</strong> {{classes.gsx$price.$t}} </li>
<li><strong>Seats:</strong> {{classes.gsx$spots.$t}} </li>
<li><strong><a href = "{{classes.gsx$url.$t}}">Sign up now</a></strong></li>
</ul>
</li>
</li>
</ul>
but when i run filterText search, it doesn't give any results. the page comes up empty. here is full code example.
http://plnkr.co/edit/ZnVqyeQ9OWqwzjIEplOU?p=preview
here is json response:
Huge thanks!