Created
June 27, 2017 08:26
-
-
Save broerse/c7952bcae2e7d9c413a02932b08b007f to your computer and use it in GitHub Desktop.
pagupdate
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 DSFA from 'ember-data-fixture-adapter'; | |
export default DSFA.extend({}); |
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 pagedArray from 'ember-cli-pagination/computed/paged-array'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
page: 1, | |
perPage: 3, | |
queryParams: ["page", "perPage"], | |
pagedContent: pagedArray('content', { | |
page: Ember.computed.alias("parent.page"), | |
perPage: Ember.computed.alias("parent.perPage"), | |
}), | |
totalPages: Ember.computed.oneWay("pagedContent.totalPages"), | |
}); |
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"; | |
var Site = DS.Model.extend({ | |
Name: DS.attr('string') | |
}); | |
Site.reopenClass({ | |
FIXTURES:[ | |
{ | |
"id" : 1, | |
"Name" : "Jan" | |
}, | |
{ | |
"id" : 2, | |
"Name" : "James" | |
}, | |
{ | |
"id" : 3, | |
"Name" : "John" | |
}, | |
{ | |
"id" : 4, | |
"Name" : "Joost" | |
}, | |
{ | |
"id" : 5, | |
"Name" : "Joop" | |
}, | |
{ | |
"id" : 6, | |
"Name" : "Justin" | |
}, | |
{ | |
"id" : 7, | |
"Name" : "Jean" | |
}, | |
{ | |
"id" : 1, | |
"Name" : "Job" | |
}, | |
] | |
}); | |
export default Site; |
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 this.store.findAll('rule'); | |
} | |
}); |
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.12.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.12.0", | |
"ember-template-compiler": "2.12.0", | |
"ember-testing": "2.12.0" | |
}, | |
"addons": { | |
"ember-data": "2.12.1", | |
"ember-cli-bootstrap-css": "0.1.1", | |
"ember-cli-pagination": "3.0.2", | |
"ember-data-fixture-adapter": "1.13.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment