Skip to content

Instantly share code, notes, and snippets.

Avatar
🐹
#TomsterOnTour

Dawid Pośliński PoslinskiNet

🐹
#TomsterOnTour
View GitHub Profile
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")