Created
November 19, 2018 14:51
-
-
Save H1D/4071c8b02fddc88bececbc1c0e246c1a to your computer and use it in GitHub Desktop.
Revisions
-
Artem Suschev created this gist
Nov 19, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ import Ember from 'ember'; import Component from '@ember/component'; import move from 'ember-animated/motions/move'; import { fadeOut } from 'ember-animated/motions/opacity'; export default Ember.Controller.extend({ * transition({ keptSprites, removedSprites }) { keptSprites.forEach(move); removedSprites.forEach(fadeOut); }, }); 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ import Model from 'ember-data/model'; import attr from 'ember-data/attr'; import { belongsTo, hasMany } from 'ember-data/relationships'; export default Model.extend({ title: attr('string') }); 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ import Ember from 'ember'; export default Ember.Route.extend({ model() { this.store.push({data:{ id: 1, type: 'book', title: "book 1" }}); this.store.push({data:{ id: 2, type: 'book', title: "book 2" }}); this.store.push({data:{ id: 3, type: 'book', title: "book 3" }}); return this.store.peekAll('book'); } }); 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ {{log model}} {{#each model as |book i|}} {{i}} {{book.title}} {{/each}} 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ { "version": "0.15.1", "EmberENV": { "FEATURES": {} }, "options": { "use_pods": false, "enable-testing": false }, "dependencies": { "jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js", "ember": "3.4.3", "ember-template-compiler": "3.4.3", "ember-testing": "3.4.3" }, "addons": { "ember-data": "3.4.2", "ember-animated": "0.3.1" } }