Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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