Skip to content

Instantly share code, notes, and snippets.

@matthieu-D
Created August 2, 2017 12:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthieu-D/85efa822423215c5860034f30601ffc9 to your computer and use it in GitHub Desktop.
Save matthieu-D/85efa822423215c5860034f30601ffc9 to your computer and use it in GitHub Desktop.
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