This file contains hidden or 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
| alert("You have been pawned!") |
This file contains hidden or 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
| ember install ember-font-awesome |
This file contains hidden or 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 Controller from '@ember/controller'; | |
| export default Controller.extend({ | |
| actions: { | |
| markAsRead(item) { | |
| this.get('store').unloadRecord(item); | |
| } | |
| } | |
| }); |
This file contains hidden or 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 BaseController from 'ember-hacker-news/controllers/base-controller'; | |
| export default BaseController.extend({ | |
| }); |
This file contains hidden or 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 Route from '@ember/routing/route'; | |
| export default Route.extend({ | |
| model(params) { | |
| return this.get('store').findRecord('item', params.id); | |
| } | |
| }); |
This file contains hidden or 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 DS from 'ember-data'; | |
| export default DS.Model.extend({ | |
| content: DS.attr('string'), | |
| user: DS.attr('string'), | |
| timeAgo: DS.attr('string'), | |
| comments: DS.hasMany('comments', { inverse: null }) | |
| }); |
This file contains hidden or 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 DS from 'ember-data'; | |
| import { computed } from '@ember/object'; | |
| export default DS.Model.extend({ | |
| title: DS.attr('string'), | |
| points: DS.attr('number'), | |
| time: DS.attr('unix-date'), | |
| timeAgo: DS.attr('string'), | |
| url: DS.attr('string'), | |
| domain: DS.attr('string'), |
NewerOlder