Created
May 19, 2016 20:30
-
-
Save Da99er/23d4e0230ca92d6ed8cf90564a346c60 to your computer and use it in GitHub Desktop.
cats
This file contains 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 Ember from 'ember'; | |
var myCats =[Em.Object.create({"img":"http://images.postadsuk.com/2015/07/05/postadsuk.com-russian-blue-x-female-kitten.JPG","reting":0}), | |
Em.Object.create({"img":"http://dazedimg.dazedgroup.netdna-cdn.com/740/azure/dazed-prod/1150/0/1150466.jpg","reting":0})]; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
cats:myCats, | |
voteUp:function(cat){ | |
cat.incrementProperty("rating"); | |
} | |
}); | |
This file contains 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 Ember from 'ember'; | |
export function myHelper(params/*, hash*/) { | |
return params; | |
} | |
export default Ember.Helper.helper(myHelper); |
This file contains 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 Ember from 'ember'; | |
import config from './config/environment'; | |
const Router = Ember.Router.extend({ | |
location: 'none' | |
}); | |
Router.map(function() { | |
this.route('index', { path: '/' }); | |
}); | |
export default Router; | |
/* | |
export default Ember.Route.extend({ | |
model() { | |
return ['Marie Curie', 'Mae Jemison', 'Albert Hofmann']; | |
} | |
}); | |
*/ |
This file contains 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
body { | |
margin: 12px 16px; | |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
font-size: 12pt; | |
} | |
img{ | |
width:50%; | |
} |
This file contains 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
{ | |
"version": "0.8.1", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.5.1", | |
"ember-data": "2.5.2", | |
"ember-template-compiler": "2.5.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment