Skip to content

Instantly share code, notes, and snippets.

@woodwardtw
Created October 6, 2015 15:00
Show Gist options
  • Save woodwardtw/5f6a4f9b03252bb4ddd8 to your computer and use it in GitHub Desktop.
Save woodwardtw/5f6a4f9b03252bb4ddd8 to your computer and use it in GitHub Desktop.
Parsing Google Sheets JSON in Angular
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Tools and Tips for 1:1</title>
<meta name="generator" content="BBEdit 11.1" />
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script>
</head>
<body ng-app="myApp" ng-controller="SuperCtrl">
<div ng-repeat="entry in tools">
<h2>{{ entry.gsx$title.$t }} </h2>
<div class="description">{{ entry.gsx$notes.$t}}</div>
{{ entry.gsx$focus.$t }}
</div>
<script>
var app = angular.module('myApp', []);
app.controller('SuperCtrl', function($scope, $http) {
$http.get("https://spreadsheets.google.com/feeds/list/1XBiQ_SOek3jMLZJOrp5whb5nPSmMuuzV4uu-8FTP6h4/1/public/values?alt=json")
.success(function(response) {$scope.tools = response['feed']['entry'];});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment