Last active
June 9, 2016 18:46
-
-
Save leifwells/b12ed12f85bd2b3aef8d5ac507e8be89 to your computer and use it in GitHub Desktop.
The Component Calling Our Google Drive Provider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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