Skip to content

Instantly share code, notes, and snippets.

@leifwells
Last active June 9, 2016 18:46
Show Gist options
  • Save leifwells/b12ed12f85bd2b3aef8d5ac507e8be89 to your computer and use it in GitHub Desktop.
Save leifwells/b12ed12f85bd2b3aef8d5ac507e8be89 to your computer and use it in GitHub Desktop.
The Component Calling Our Google Drive Provider
import { Component } from "@angular/core";
import { GoogleDriveProvider } from './../../providers/google-drive/google-drive';
@Component({
templateUrl: 'build/pages/home/home.html',
providers: [ GoogleDriveProvider ]
})
export class HomePage {
persons: Array<any>;
dataId: string;
constructor( gDrive: GoogleDriveProvider ) {
this.dataId = '15Kndr-OcyCUAkBUcq6X3BMqKa_y2fMAXfPFLiSACiys';
gDrive.load( this.dataId )
.then( ( data ) => {
console.log( data );
this.persons = data;
}, (error) => {
console.log( error );
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment