Skip to content

jlovison/angular-gcms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular-gcms

Build Status

Use a google spreadsheet as a backend content repository

Full Instructions

Quickstart

Install using:

bower install jlovison/angular-gcms

Add to your project:

angular.module('YourModule', ['OtherStuff', 'jlovison.gcms'])

Assuming you have a google spreadsheet being published with an id of '12345' and two columns ('title' and 'post' respectively), pull in the spreadsheet data as follows:

angular.module('YourApp')
.controller('YourController', function ($scope, GcmsService) {
    GcmsService.get(
        '12345', // Your sheet ID
        ['title', 'post'] // A list of your column fields in order
    ).then(function(data) { // Catch the fulfilled promise
        $scope.content = data;
    });
});

The content variable in the scope will be a list of {'tile': "Stuff", 'post': "More stuff"} objects - one for each row.

See the full instructions above for more detailed info, including why you might want to use this.

About

Use a google spreadsheet as a backend content repository

Resources

License

Stars

Watchers

Forks

Packages

No packages published