Last active
August 29, 2015 14:26
-
-
Save KTKate/1adcf54363b9c1334845 to your computer and use it in GitHub Desktop.
New Twiddle
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 default Ember.Controller.extend({ | |
appName:'Ember Twiddle', | |
width: 5 | |
}); |
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 DS from 'ember-data'; | |
export default DS.Model.extend({ | |
name: DS.attr('string'), | |
things: DS.attr() | |
}); |
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'; | |
var Router = Ember.Router.extend({ | |
location: config.locationType | |
}); | |
Router.map(function() { | |
this.route('stuff', function(){}); | |
}); | |
export default Router; |
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 default Ember.Controller.extend({ | |
otherArray: Ember.computed('model.things', function(){ | |
return this.get('model.things'); | |
}) | |
}); | |
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 default Ember.Route.extend({ | |
model: function(){ | |
return new Ember.RSVP.Promise(function (resolve) { | |
Ember.run.later(function () { | |
resolve({name: 'bob', things: [0, 1, 2]}); | |
}, 5000); | |
}); | |
} | |
}); |
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; | |
} | |
.wide {background-color: orange;} | |
.loading-contaier { | |
height: 100%; | |
width: 50px; | |
text-align: center; | |
} | |
.loading-container { | |
background-color: white; | |
} | |
.loading { | |
display: inline-block; | |
width: 50px; | |
height: 50px; | |
position: relative; | |
border: 4px solid orange; | |
top: 50%; | |
animation: loading 4s infinite ease; | |
} | |
.loading-inner { | |
vertical-align: top; | |
display: inline-block; | |
width: 100%; | |
background-color: orange; | |
animation: loading-inner 4s infinite ease-in; | |
} | |
@keyframes loading { | |
0% { | |
transform: rotate(0deg); | |
} | |
25% { | |
transform: rotate(180deg); | |
} | |
50% { | |
transform: rotate(180deg); | |
} | |
75% { | |
transform: rotate(360deg); | |
} | |
100% { | |
transform: rotate(360deg); | |
} | |
} | |
@keyframes loading-inner { | |
0% { | |
height: 0%; | |
} | |
25% { | |
height: 0%; | |
} | |
50% { | |
height: 100%; | |
} | |
75% { | |
height: 100%; | |
} | |
100% { | |
height: 0%; | |
} | |
} |
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.4.6", | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/1.13.5/ember.js", | |
"ember-data": "https://cdnjs.cloudflare.com/ajax/libs/ember-data.js/1.13.5/ember-data.js", | |
"ember-template-compiler": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/1.13.5/ember-template-compiler.js" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment