Created
August 2, 2017 12:52
-
-
Save matthieu-D/85efa822423215c5860034f30601ffc9 to your computer and use it in GitHub Desktop.
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 * as firebase from 'firebase'; | |
import { environment } from '../../environments/environment'; | |
... | |
@Component({ | |
selector: 'page-home', | |
templateUrl: 'home.html' | |
}) | |
export class HomePage { | |
someTextUrl; | |
constructor() { | |
firebase.initializeApp(environment.firebase); | |
this.getSomeText(); | |
} | |
getSomeText() { | |
firebase.storage().ref().child('some text').getDownloadURL() | |
.then(response => this.someTextUrl = response) | |
.catch(error => console.log('error', error)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment