mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
14 lines
302 B
JavaScript
14 lines
302 B
JavaScript
export class HackerNews {
|
|
constructor() {
|
|
this.fb = new Firebase('https://hacker-news.firebaseio.com/v0');
|
|
this.getPosts();
|
|
}
|
|
|
|
getPosts() {
|
|
console.log('GETTING POSTS');
|
|
this.fb.child('topstories').on('value', function(snapshot) {
|
|
console.log(snapshot.val());
|
|
});
|
|
}
|
|
}
|