View controllers.application.js
import Ember from 'ember'; | |
import { computed } from '@ember/object'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
label: '', | |
hashCode(str) { | |
let hash = 0; | |
for (let i = 0; i < str.length; i++) { |
View controllers.application.js
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
actions: { | |
add() { | |
const { title, calories } = this; | |
this.db.recipes.add({ title, calories: parseInt(calories) }).then(() => { | |
this.db.table("recipes") | |
.orderBy("calories") |
OlderNewer